onClickListener couses Crash with TextView
<p>im trying to create a simple application with no luck
i just want to preform some action if i touches the list view
if i'm not adding the onClickListener everything is ok
java:</p>

<pre><code>        ListView myListView = (ListView)findViewById(R.id.listViewOptions);
    final ArrayList&lt;String&gt; optionsArray = new ArrayList&lt;String&gt;();



    final ArrayAdapter&lt;String&gt; arrayAdapter;


    arrayAdapter = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_list_item_1,optionsArray);

    for(int i =1 ; i &lt; 3 ; i++)
    {
        optionsArray.add("1");
        arrayAdapter.notifyDataSetChanged();
    }

    myListView.setAdapter(arrayAdapter);
    myListView.setClickable(true);
    myListView.setFocusable(true);


   OnClickListener onClickListener = new OnClickListener() {

    public void onClick(View v) {
        // TODO Auto-generated method stub

    }
};

myListView.setOnClickListener(onClickListener);
</code></pre>

<p>XML:</p>

<pre><code>&lt;ListView android:layout_height="wrap_content" 
android:layout_width="fill_parent" 
android:layout_weight="1" 
android:id="@+id/listViewOptions" 
android:clickable="true"&gt;
&lt;/ListView&gt;
</code></pre>

<p>Thanks</p>

<p>Log:</p>

<pre><code>E/AndroidRuntime(  232): Caused by: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
E/AndroidRuntime(  232):    at android.widget.AdapterView.setOnClickListener(AdapterView.java:750)
E/AndroidRuntime(  232):    at com.resume.Resume.onCreate(Resume.java:52)
E/AndroidRuntime(  232):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
E/AndroidRuntime(  232):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
E/AndroidRuntime(  232):    ... 11 more
I/Process (   52): Sending signal. PID: 232 SIG: 3
I/dalvikvm(  232): threadid=7: reacting to signal 3
E/dalvikvm(  232): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
W/ActivityManager(   52): Launch timeout has expired, giving up wake lock!
W/ActivityManager(   52): Activity idle timeout for HistoryRecord{439114c0 com.resume/.Resume}
</code></pre>
