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:

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

Optional Element Summary
 String[] resName
           
 int[] value
           
 

value

public abstract int[] value
Default:
-1

resName

public abstract String[] resName
Default:
""


Copyright © 2010-2014. All Rights Reserved.