Android clickable list item in a search interface
<p>In my android app my search function works, the list gets correctly populated, but the items are not clickable. I'm trying to get that to work. Here's my code, can anyone see why the items are not clickable?</p>

<pre><code>    private void showResults(String query) {
    Cursor cursor = DBHelper.searchDB(query);
    startManagingCursor(cursor);
    String[] searchFrom = new String[] { DBAdapter.KEY_TITLE,
            DBAdapter.KEY_YEAR, DBAdapter.KEY_MAKE,
            DBAdapter.KEY_MODEL };
    int[] displayHere = new int[] { R.id.rTitleTV, R.id.rYearTV,
            R.id.rMakeTV, R.id.rModelTV };
    SimpleCursorAdapter records = new SimpleCursorAdapter(this,
            R.layout.record_2, cursor, searchFrom, displayHere);
    setListAdapter(records);
    DBHelper.close();

    // --- Click on list item ---

    ListView clickList = getListView();
    clickList.setOnItemClickListener(new AdapterView.OnItemClickListener() {

                @Override
                public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1,
                        int arg2, long arg3) {
                    // TODO Auto-generated method stub

                }
            });

    // --- END click on list item ----

}
</code></pre>

<p>I just want to get the onClick to work, I don't care that it doesn't do anything at the moment. I'll put that functionality in later.</p>

<hr>

<p>An example of <code>record_2.xml</code>:</p>

<pre><code>&lt;TextView 
    android:id="@+id/rMakeTV" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginLeft="5dp" 
    android:text="Make" 
    android:textColor="#000000" 
    android:textSize="16dp" 
    android:textStyle="bold" &gt; 

&lt;/TextView&gt;
</code></pre>

<p>I've tried this, based on what Sam is pointing out, but the list items are still not clickable.</p>

<pre><code>        // --- Click on list item ---

    AdapterView&lt;?&gt; clickList = getListView();
    clickList.setOnItemClickListener(new AdapterView.OnItemClickListener() {

                @Override
                public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1,
                        int arg2, long arg3) {
                    // TODO Auto-generated method stub

                }
            });

    // --- END click on list item ----
</code></pre>

<p>It seems to me that since there's no reference to the <code>records</code> ListAdapter in the <code>setOnItemClickListener</code> it won't work?</p>
