title: how to add action dynamically for multiple checkbox on android?
body: <p>In my project rows are added dynamically to the table depending on selected items from database. This table contains a column with checkbox</p>
  
  <p>How can I set action for each checkbox that are added dynamically ? The table looks like this</p>
  
  <blockquote>
  <pre><code>    column1        column2          column3
       id1            data1             checkbox1
       id2            data2             checkbox2
      .
      .
      .
      .
      .
      .idn            datan             checkboxn
  </code></pre>
  </blockquote>
  
  <p>Then I want to set action for all selected checkbox and the no of checkbox not defined that changes on every activity..</p>
  
  <pre><code>  CheckBox  check[i]= new CheckBox(this); 
  
      check[i].setOnClickListener(new OnClickListener()
      {
          public void onClick(View v)
          {
              //code
          }
      });
  </code></pre>
  
  <p>Is it possible to use this logic? </p>