@Retention(value=CLASS)
@Target(value=METHOD)
public @interface ItemLongClick
This annotation is intended to be used on methods to receive events defined
by AdapterView.OnItemLongClickListener.onItemLongClick(android.widget.AdapterView, android.view.View, int, long)
when a list item has been long 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 :@ItemLongClick(R.id.myList) public void itemLongClickedOnMyList() { // ... } @ItemLongClick(R.id.myList) public void myListItemPositionLongClicked(int position) { // ... } @ItemLongClick public void myListItemLongClicked(MyItem clickedItem) { // ... }
ItemClick
,
ItemSelect
Copyright © 2010-2014. All Rights Reserved.