public void Onitemclick (adapterview<?> arg0, view view, int position,
Long Arg3)
X, y two listview,x there are 1,2,3,4 in these 4 item,y have a,b,c,d these 4 item.
If you order b this item. As follows:
public void Onitemclick (adapterview<?> parent,//parent is equivalent to a pointer to the ListView y adapter, which can be used to get everything that's in Y, and then it's plain to tell you that you ordered Is Y, not X--,
View view,//view is the handle of the view that you point to B item, that is, you can use this view to get the ID of the control in B and then manipulate the control
int position,//position is the position of B in the Y adapter (when the ListView is generated, the adapter makes the item one after the other, and then puts them in order, and puts them in the ListView, meaning that this B is the number position)
Long ID//ID is the position of the first line of B in ListView Y (obviously the 2nd line), most of the time the value of position and ID is the same, if necessary, you can add a log to the position and ID all out in Logcat, After watching, my heart was steadfast.
Android in the ListView click Listener Onitemclick Four parameters meaning