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