Thursday, 20 March 2014

Checked Checkbox dynamically in Android

Setting the checkbox uncheck dynamically from java file;

Declaring the check box in layout XML file;

<CheckBox
                  android:id="@+id/chkActiveCall"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_above="@+id/buttonOk"
                  android:layout_alignParentLeft="true"
                  android:text="  Active Call Notification"

                  android:textSize="22sp" />


Unchecking Checkbox by

private void CheckedEnableCheckbox()
    {
       chkActiveCall.setChecked(false);
    }

No comments:

Post a Comment