Android App- Using a loop for setText procedure to populate EditText
<p>Trying to use a loop to set the text of 12 checkboxes from a db query.  Would like to substitute  "add1" with an array value and loop through all 12 instead of spelling out each one.  Any ideas of how to do this?</p>

<p>Here is the code I am trying to modify:</p>

<pre><code>add1Text= (CheckBox) findViewById(R.id.add1);
if (cursor.getString(cursor.getColumnIndex("add1")) == null) {
    add1Text.setVisibility(View.GONE);
}
else {
    add1Text.setText(cursor.getString(cursor.getColumnIndex("add1")));
}
</code></pre>
