@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface OnItemLongClick
OnItemLongClickListener on the view for each
ID specified.
@OnItemLongClick(R.id.example_list) boolean onItemLongClick(int position) {
Toast.makeText(this, "Long clicked position " + position + "!", Toast.LENGTH_SHORT).show();
return true;
}
Any number of parameters from
onItemLongClick may be used on the method.AdapterView.OnItemLongClickListener| Modifier and Type | Optional Element and Description |
|---|---|
int[] |
value
View IDs to which the method will be bound.
|