@Retention(value=CLASS)
@Target(value=METHOD)
public @interface ItemClick
This annotation is intended to be used on methods to receive events defined
by AdapterView.OnItemClickListener.onItemClick(android.widget.AdapterView, android.view.View, int, long)
when a list item has been clicked by the user.
The annotation value should be one or several of R.id.* fields. If not set, the method name will be used as the R.id.* field name.
The method MAY have one parameter :
int parameter to know the position of the clicked item.
Or, a parameter of the type of the Adapter linked to the listview.
Example :
@ItemClick(R.id.myList)
public void itemClickedOnMyList() {
// ...
}
@ItemClick(R.id.myList)
public void myListItemPositionClicked(int position) {
// ...
}
@ItemClick
public void myListItemClicked(MyItem clickedItem) {
// ...
}
ItemLongClick,
ItemSelectCopyright © 2010-2014. All Rights Reserved.