How to do an onListItemClick?
<p>I have an <code>Activity</code> and I want to do a <code>setOnListItemClick</code> on my <code>Listview</code> but I seem unable to do it. </p>

<p>I am only able to do it with ListActivity but I need an <code>EditText</code> so I can't use the <code>ListActivity</code>.</p>

<p>Can anyone help me?</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);    

    listview = (ListView) findViewById(R.id.listview);
    edittext = (EditText) findViewById(R.id.search_box);

    arrayA = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_list_item_1, eventTitle);
    setListAdapter(arrayA);
}

@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
    super.onListItemClick(l, v, position, id);
    // Get the item that was clicked

}
</code></pre>
