title: Cant get the values from dynamically added check box
body: <p>While click the button i have added a checkbox, finally need to get the all checked checkbox value by means of clicking submit button,</p>
  
  <p>This is my code</p>
  
  <pre><code>mIncrementButton.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
  
                  LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                          LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
  
                  params.setMargins(20, 0, 0, 0);
  
                  CheckBox checkbox = new CheckBox(MainActivity.this);
  
                  checkbox.setLayoutParams(params);
                  mAllText.add(checkbox);
                  checkbox.setText("Checkbox" + j);
  
                  checkboxlayout.addView(checkbox);
                  j++;
  
                  Log.d("j", "---&gt;" + j);
  
              }
          });
  
          mGetTheVlue.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
                  Log.d("Inside Button", "Inside Burron" + mAllText.size());
  
                  for (int i = 0; i &lt; mAllText.size(); i++) {
                      CheckBox check = mAllText.get(i);
                      if (check.isChecked()) {
                          AllCheckbox.add(check.getText().toString());
                      }
  
                  }
  
              }
          });
  </code></pre>
  
  <p>Now i need to check whether all checkbox are checked and need to get the values,
  Dont know whether this question is so old or not. but i dint get any solution from google kindly help to get the solution.</p>
  
  <p>Thanks in advance.</p>