title: android get selected checkboxes in a group
body: <p>I am implementing something like a category, so a product can be in 1 or more categories</p>
  
  <p>now i set a Tag for the CheckBox like</p>
  
  <pre><code>  &lt;CheckBox
                  android:id="@+id/c1"
                  android:tag="checkbox1"
                  android:text="Title"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content" /&gt;
  </code></pre>
  
  <p>and go on</p>
  
  <p>when the user press to save i check if each checkbox is selected than add the tag to a arraylist and convert it to String separed by comma and save</p>
  
  <p>when i need to get the list and set the selected checkbox, i receive the String from db, split into a String[] then iterate over it, find the element in android using the getResource, and then set it to select=true.</p>
  
  <p>I see that like a huge job, i saw sometime ago(cant remember) a kind of group of checkbox you just use groupOfCheckBox.getSelected();</p>
  
  <p>if you selected the number one and number 2 it return 1,2..</p>
  
  <p>and to set it checked was easy as groupofCheckBox.setSelect("1,2")</p>
  
  <p>but i cant find it anymore, someone know if i was dreaming about it or really exist some way to do that</p>