Multiple CheckBox in android -
i have 2 checkboxes in code qualification (ug , pg checkboxes)
i want when user choose checkboxes , click on submit button in second activity text of checkboxes should appear in textview...
i have created button , onclick function.... , using intent sending data 1 activity another..... have no idea of how send checkbox text other activity , in other activity how show on textview.....????
thanks in advance.....
when button pressed this
public void onclick(view v){ string text=""; if(ug.ischecked()){ text="ug"; }else{ text="pg"; } intent i=new intent(firstactivity.this,secondactivity.class); i.putextra("checkboxvalue",text); startactivity(i); }
in oncreate()
method of secondactivity
is
string value=getintent().getstringextra("checkboxvalue"); textview.settext(value);
Comments
Post a Comment