title: ListFragment onItemClick
body: <p>I am using <code>import android.support.v4.app.ListFragment</code> to create a ListFragment. Inside the fragment itself -- not the parent activity -- I want to implement the <code>onItemClick</code> method. Will someone please provide a simple example on how this might work?</p>
  
  <pre><code>public class MyListFragment extends ListFragment {
  
      Spannable[] stuff = {};//to be filled
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          ArrayAdapter&lt;Spannable&gt; adapter = new ArrayAdapter&lt;Spannable&gt;(inflater.getContext(), android.R.layout.simple_list_item_1, stuff);
          setListAdapter(adapter);
          return super.onCreateView(inflater, container, savedInstanceState);
      }
  
      @Override
      public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long arg3) {
  //this is red underlined by eclipse
      }
  }
  </code></pre>