Thursday, April 12, 2012

Store Checkbox value to array list

How do i store the value of a checked checkbox to an array list and display it in a list./..say Checkbox1 = "Apple"......so far i have this"



public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {



            if (checkBox1.isChecked()) {


//my problem is below here: I can't seem to add the value of it not the id and store it in list



                pubsList.add(pub3);
pub3=Integer.toString(checkBox1.getSelectedItem());




No comments:

Post a Comment