listview checked
<p>hey guys i am trying to set the first item on the listview checked but the code is not working. </p>

<pre><code>import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ListView1 extends ListActivity {
@Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);

       String[] names = new String[] { "Android", "Windows7", "Symbian", "iPhone",
              "Android", "Windows7", "Symbian", "iPhone",
              "Android", "Windows7", "Symbian", "iPhone" };
         setListAdapter(new ArrayAdapter&lt;String&gt;(this,
                           android.R.layout.simple_list_item_single_choice,
                           android.R.id.text1, names));
         ListView listView = getListView();
         listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
         listView.setSelection(0);
         listView.setSelected(true);

   }}
</code></pre>

<p><a href="http://hidroilio.com/video/22.png" rel="nofollow">picture of the activity</a>
i want the first radio button been checked
any help would be appreciated
Best regards
HP </p>
