org.androidannotations.annotations
Annotation Type ItemClick
@Retention(value=CLASS)
@Target(value=METHOD)
public @interface ItemClick
This annotation is intended to be used on methods to receive events defined
by android.widget.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 :
- An
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) {
// ...
}
- See Also:
ItemLongClick
,
ItemSelect
value
public abstract int[] value
- Default:
- -1
resName
public abstract String[] resName
- Default:
- ""
Copyright © 2010-2014. All Rights Reserved.