@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface OnFocusChange
OnFocusChangeListener on the view for each ID
specified.
@OnFocusChange(R.id.example) void onFocusChanged(boolean focused) {
Toast.makeText(this, focused ? "Gained focus" : "Lost focus", Toast.LENGTH_SHORT).show();
}
Any number of parameters from onFocusChange may be used on the method.View.OnFocusChangeListener| Modifier and Type | Optional Element and Description |
|---|---|
int[] |
value
View IDs to which the method will be bound.
|