java - Send checkbox to another Activity -


I have a DO list, and when the checkbox is checked, I want to go to the app in this adapter code:

  The public class increases the MyItemAdapter ArrayAdapter & lt; String & gt; {Personal Final Reference Reference; Private last string [] value; Public MyItemAdapter (Reference Reference, String [] Value) {Super (Reference, R. Late. Atom_list, Value); This.context = context; this. Value = value; } @ Override public view getView (integer status, seeviewview, ViewGroup guardian) {layoutInfleter Inflator = (layout inferator) reference .getSystemService (reference. LAOUT_INFLATER_SERVICE); See row view- inflater.inflate (R.layout.item_list, parent, wrong); Checkbox text view = (checkbox) rowView.findViewById (R.id.checkBox1); TextView.setText (value [position]); Return line view; } Get public static sparbonsArrayContactMets () {// TODO auto-generated method stub returns empty; } Public static zero extracting (object pauses) {// TODO auto generated method stub} Public Zero DataData (string [] items) {// Todo auto-generated method stub} Public static zero set adapter (MyItemAdapter mAdapter) {// TODO Auto -generated method stub}  

}

And this is the code I have done so far:

  check = (checkbox ) SearchVBIID (RID checkbox 1); Check it .Seton Checked Change Listener (New Compound Button On Checked Change Listener) {@OverWide Public Watch On Cheeked Changez (Compound Button Button View, Boolean Check) {If (Check is) {}  

Which code should I put for this

You need to start Use putExtra to give other information to your activity, and additional information to new activity

  Intent Check out the new intent (this, MyActivityClass.class); intent.putExtra ("checkbox_state", check.Icecited ()); current activity (intent);  

In your second activity, you This value is obtained by obtaining the intent, and extracting additional information

  intent to intent = this.Gettingent (); check = intent.GetolunNextra (Extra_ISBUILTN);  

Comments