Open cwnga opened 11 years ago
Hi @cwnga, looks good overall, you were able to get the filters working and properly query based on them. You got the spinners working (although check out http://developer.android.com/reference/android/widget/AbsSpinner.html#attr_android:entries for simpler static spinner value population i.e android:entries="@array/foo")
Do you have any questions for us about this homework or any of the concepts so far?
hi , I have a question about menu item, if I use android:onClick in example
I am not sure how to use onClick in meun. in my assignment , I use onOptionsItemSelected to handle onClick to trigger function
android:onClick is workable or not in menu?
thanks you
Yes, you can also use onClick. However, an important note is that the expected parameter is MenuItem, not View. For example, I'd expect a method like:
public void fun1(MenuItem menuItem) {
// Implementation goes here...
}
Note in the future that when you get a core dump, you should look at the exception that got thrown in the LogCat, it will generally give you a pretty good hint as to what the problem is.
OKOK, got it , thanks a lot!
dear, my assignment 2 version 1 has done, may need sometime to refactor my code / . \ https://github.com/cwnga/code/tree/master/android/week2/android_google_image_searcher
/cc @nesquena @timothy1ee