@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface OnEditorAction
OnEditorActionListener on the view for each
ID specified.
@OnEditorAction(R.id.example) boolean onEditorAction(KeyEvent key) {
Toast.makeText(this, "Pressed: " + key, Toast.LENGTH_SHORT).show();
return true;
}
Any number of parameters from
onEditorAction may be used on the method.TextView.OnEditorActionListener| Modifier and Type | Optional Element and Description |
|---|---|
int[] |
value
View IDs to which the method will be bound.
|