@Target(value=METHOD)
@Retention(value=CLASS)
public @interface OnItemClick
OnItemClickListener on the view for each ID
specified.
@OnItemClick(R.id.example_list) void onItemClick(int position) {
Toast.makeText(this, "Clicked position " + position + "!", LENGTH_SHORT).show();
}
Any number of parameters from onItemClick may be used on the method.AdapterView.OnItemClickListener,
Optional| Modifier and Type | Required Element and Description |
|---|---|
int[] |
value
View IDs to which the method will be bound.
|
Copyright © 2013-2014. All Rights Reserved.