Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private CheckBox checkBox;
- public class MyActivity extends Activity {
- protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- setContentView(R.layout.content_layout_id);
- checkBox = (CheckBox) findViewById(R.id.checkbox_id);
- if (checkBox.isChecked()) {
- checkBox.setChecked(sPref.getBoolean("MyCheck1" false));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement