Android AdapterView clears the cache view method, androidadapterview
AdapterView. SetAdapter (null );
AdapterView. SetAdapter (mAdapter );
You can.
Android AdapterView <?> Arg0, View arg1, which indicates
In fact, you will find that the parameter of this method is such AdapterView. <?> Parent, View view. The first one refers to the parent Vjew. For example, if you are a ListView, arg0 is the ListView, and arg1 is the View of the Item you clicked.
How to determine the View in the Click Event in Android
(1) bind the Adapter. Do you need to determine the Child Item of the View component? Register AdapterView. onItemclickListener separately. The parameter callback in it can distinguish the subitem that is clicked;
(2) If you do not need a partition Item, register the View for the two View components. onClickListener can be used, or the Activity can implement View. onClickListener interface, register the listener for the two View components, and then write a switch statement in The onClick method, you can follow case R. id. xxx does what you want to do.