如何将选中复选框的值存储到数组列表中并将其显示在列表中。/ ..say Checkbox1 =“Apple”......到目前为止我有这个
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());
}
}