org.androidannotations.annotations
Annotation Type FocusChange
@Retention(value=CLASS)
@Target(value=METHOD)
public @interface FocusChange
This annotation is intended to be used on methods to receive events defined
by
View.OnFocusChangeListener.onFocusChange(android.view.View, boolean)
after focus is changed on the targeted View or subclass of View.
The annotation value should be one or several R.id.* fields that refers to
View or subclasses of View. If not set, the method name will be used as the
R.id.* field name.
The method MAY have multiple parameter:
- A
View
parameter to know which view has targeted
this event
- An
boolean
to know the view has focus.
Example :
@FocusChange(R.id.myButton)
void focusChangedOnMyButton(boolean isChecked, View button) {
// Something Here
}
@FocusChange
void myButtonFocusChanged(View button) {
// Something Here
}
@FocusChange({R.id.myButton, R.id.myButton1})
void focusChangedOnSomeButtons(View button, boolean isChecked) {
// Something Here
}
@FocusChange(R.id.myButton)
void focusChangedOnMyButton() {
// Something Here
}
- Author:
- Rostislav Chekan
value
public abstract int[] value
- Default:
- -1
resName
public abstract String[] resName
- Default:
- ""
Copyright © 2010-2014. All Rights Reserved.