Android List Activity
<p>I have this application for getting the contacts and I got the three lists on           spinerClick.  How can I develop onClick event on particular List item click.     </p>

<pre><code>    package Com.ContactProject;

    import android.app.ListActivity;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.AdapterView;
    import android.widget.ArrayAdapter;
    import android.widget.ListAdapter;
    import android.widget.Spinner;

    public class ContactSpinners extends ListActivity
          implements AdapterView.OnItemSelectedListener {
    private static String[] options={
            "Contact Names",
            "Contact Names &amp; Numbers",
            "Contact Names &amp; Email Addresses"};
private ListAdapter[] listAdapters=new ListAdapter[3];

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main2);

    initListAdapters();

    Spinner spin=(Spinner)findViewById(R.id.spinner);
    spin.setOnItemSelectedListener(this);

    ArrayAdapter&lt;String&gt; aa=new ArrayAdapter&lt;String&gt;(this,
                                                        android.R.layout.simple_spinner_item,
                                                        options);

    aa.setDropDownViewResource(
                    android.R.layout.simple_spinner_dropdown_item);
    spin.setAdapter(aa);
}

public void onItemSelected(AdapterView&lt;?&gt; parent,
                                                            View v, int position, long id) {
    setListAdapter(listAdapters[position]);
}

public void onNothingSelected(AdapterView&lt;?&gt; parent) {
    // ignore
}

private void initListAdapters() {
    listAdapters[0]=ContactsAdapterBridge.INSTANCE.buildNameAdapter(this);
    listAdapters[1]=ContactsAdapterBridge.INSTANCE.buildPhonesAdapter(this);
    listAdapters[2]=ContactsAdapterBridge.INSTANCE.buildEmailAdapter(this);
}

}
</code></pre>
