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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -