I am generating a list of check boxes, after parsing it from a JSON. When the submit button is pressed i want to know which all boxes are checked. How do i do this ?
My xml code (Omitting very obvious stuff like height, width, xmlns etc.) :
<LinearLayout>
<TextView
android:id="@+id/title"
android:text="@string/CatalogueTitle" />
<CheckBox
android:id="@+id/checkBox" />
</LinearLayout>
This java snippet populates data and adds the text to the adjacent TextView
TextView title = (TextView) v.findViewById(R.id.title);
CheckBox cbox = (CheckBox) v.findViewById(R.id.checkBox);
if (title != null) {
title.setText(tdunit.title);
}
Onsubmit, how can I identify a checkbox?