CheckBox
• A checkbox is a specific type of two-states button that can be either checked or unchecked ]
• In Check Box you can select either one or more check boxes.
checkbox inside your activity would be :
public class MyActivity extends Activity {
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.content_layout_id);
final CheckBox checkBox = (CheckBox) findViewById(R.id.checkbox_id);
if (checkBox.isChecked()) {
checkBox.setChecked(false); }
}
}
• In Check Box you can select either one or more check boxes.
checkbox inside your activity would be :
public class MyActivity extends Activity {
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.content_layout_id);
final CheckBox checkBox = (CheckBox) findViewById(R.id.checkbox_id);
if (checkBox.isChecked()) {
checkBox.setChecked(false); }
}
}
Post a Comment