title: OnItemClickListener
body: <p>I have an error that says "OnItemClickListener cannot be resolved to a type" when I enter this code in:</p>
  
  <pre><code>package com.funkystudios.android.facts;
  
  import android.app.ListActivity;
  import android.os.Bundle;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  
  
  
  
  
  
  public class activity2 extends ListActivity {
   @Override
   public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
  
     String[] Facts = getResources().getStringArray(R.array.Facts_Array);
     setListAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.list, Facts));
     ListView lv = getListView();
     lv.setTextFilterEnabled(true);
     lv.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView&lt;?&gt; parent, View view,
            int position, long id) {
          // When clicked, show a toast with the TextView text
          Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
              Toast.LENGTH_SHORT).show();
        }
      });
  
   }
  }
  </code></pre>
  
  <p>It occurs right at the "lv.setOnItemClickListener(new OnItemClickListener() {". I'm not sure what I'm doing wrong.</p>