Edit CheckBox and EditText located in another XML file

ibbpero

New Member
So I'm in activity Home which has:\[code\]setContentView(R.layout.home);\[/code\]Now, from Home activity, one can go to Settings activity which has:\[code\]setContentView(R.layout.settings);\[/code\]It has a couple of CheckBoxes and EditTexts.Is it possible to edit the state of those checkboxes from the Home activity?I already declared them in Home like this:\[code\]CheckBox checkBox1 = (CheckBox) findViewById(R.id.checkBox1);\[/code\]Which finds the ID just fine but the application crashes on the line where I try to \[code\]checkBox1.setChecked(true);\[/code\]Is it not possible to access it from another activity??Thank you
 
Back
Top