Android - SearchView - onClick - IllegalStateException error
Why am I getting this error when I execute this:
08-17 18:16:27.674: E/AndroidRuntime(12321):
java.lang.IllegalStateException: Could not execute method of the activity
xml
<SearchView
android:id="@+id/search_bar"
android:layout_width="fill_parent"
android:layout_height="@dimen/searchbar_height"
android:gravity="center_vertical"
android:background="#FFFFFF"
android:onClick="search_bar" />
Activity
public void search_bar(View v) {
sv.setIconified(false);
}
No comments:
Post a Comment