title: Set ListView checkmark as checked/unchecked by program in Android ListActivity
body: <p>Couples of example I have had referred for my Android application. In ListActivity,before the <strong>OnCreate</strong> method, the <strong>items</strong> array was predefined as</p>
  
  <pre><code>String[] items = new String[]{"Text for Item1", "text for item2", ....};
  </code></pre>
  
  <p>Inside the <strong>OnCreate</strong> method, I use the simplest way to set the adapter and display the list view below:</p>
  
  <pre><code>setListAdapter( new ArrayAdapter&lt;String&gt;(this,
   android.R.layout.simple_list_item_checked, items));
  </code></pre>
  
  <p>And I have had override the method:</p>
  
  <pre><code>@Override    
   protected void onListItemClick(ListView l, View v, int position, long id)    
  {     
       CheckedTextView textview = (CheckedTextView)v;
       textview.setChecked(!textview.isChecked());
  } 
  </code></pre>
  
  <p>All above code is worked fine. The checkmark for each litem in the ListView can be displayed and set checked/unchecked manually.</p>
  
  <p><strong>MY PROBLEM IS</strong>: 
  I want to set some items by program,not by hand clicking, to be checked/unchecked and the checkmark be changed along too. Can it be done and how to do it ?  </p>
  
  <p>Thanks for the help in Advance </p>