@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface OnTouch
OnTouchListener on the view for each ID specified.
@OnTouch(R.id.example) boolean onTouch() {
Toast.makeText(this, "Touched!", Toast.LENGTH_SHORT).show();
return false;
}
Any number of parameters from
onTouch may be used
on the method.View.OnTouchListener| Modifier and Type | Optional Element and Description |
|---|---|
int[] |
value
View IDs to which the method will be bound.
|