Android CheckBox setCheck(True)
<p>I wanto do the upload from Android sqlite to sql sever. Its working fine uploading.Problem is : each table upload finish , service return true/false. If it is true then need to <code>setChecked(true);</code>. Here i created check box dynamically in one method, i want to set the status from another method....</p>

<pre><code>   @Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    View viewInflate = LayoutInflater.from(UploadActivity.this).inflate(R.layout.upload_screen, null);
    setContentView(viewInflate);
    if (uploadTable.size() &gt; 0) {
        for (int i = 0; i &lt; uploadTable.size(); i++) {
            TableRow tr = new TableRow(this);
            tr.setId(i);
            ch = new CheckBox(this);
            ch.setId(i);
            ch.setChecked(false);
            tr.addView(ch);
            TextView tv2 = new TextView(this);
            createView(tr, tv2, uploadTable.get(i));
            uploadingTable.addView(tr);
        }
    }
  }
</code></pre>

<p>This is the method calling service..</p>

<pre><code>   public boolean soapPrimitiveData(String tablename,String strBusinessUnit, String strExecutive,String jsonString) throws IOException,XmlPullParserException {
    SoapPrimitive responsesData = null;
    boolean status =false;
    SoapObject requestData = new SoapObject(NAMESPACE, METHOD_NAME); // set
    requestData.addProperty("strBusinessUnit", strBusinessUnit);
    requestData.addProperty("strExecutiveCode", strExecutive);
    requestData.addProperty("strTableName", tablename);
    requestData.addProperty("jsonContent", jsonString);
    SoapSerializationEnvelope envelopes = new SoapSerializationEnvelope(SoapEnvelope.VER11); // put all required data into a soap//// envelope
    envelopes.dotNet = true;
    envelopes.setOutputSoapObject(requestData);
    AndroidHttpTransport httpTransport = new AndroidHttpTransport(APPURL);
    httpTransport.debug = true;
    try {
        httpTransport.call(SOAP_ACTION, envelopes);
        responsesData = (SoapPrimitive) envelopes.getResponse();
        if((responsesData.toString()).equals("true")){
            DBAdapter dbAdapter = DBAdapter.getDBAdapterInstance(UploadActivity.this);

            status = dbAdapter.updateUploadedTable(tablename, strExecutive, strBusinessUnit);

                 if(status){
                   ch.setChecked(true);
                  }
        }


    } catch (SocketException ex) {
        Log.e("Error : " , "Error on soapPrimitiveData() " + ex.getMessage());
        ex.printStackTrace();
    } catch (Exception e) {
        Log.e("Error : " , "Error on soapPrimitiveData() " + e.getMessage());
       e.printStackTrace();
    }
    return status;
}
</code></pre>

<p>This is not checked check box value. How can i take particular checkbox.for example findById() also can't use it.</p>

<p>Layout design like this:</p>

<pre><code>    CheckBox  WMInvoice
    CheckBox  WMInvoiceLine
</code></pre>

<p>Like that.but it create dynamically.</p>

<p>Please help me out from this problem</p>
