title: List item clicklistener not working
body: <p>My code seemed to be working just fine but after a few days i noticed that the item click listener stoped listening. I noticed that gatListView() does not get the list.. What could possibly have gone wrong?
  Here is my code:</p>
  
  <pre><code>public class NewsFragment extends ListFragment {
  
  
      private NewsFragment local;
      public static final String IMAGE_RESOURCE_ID = "iconResourceID";
      public static final String ITEM_NAME = "itemName";
      public LinearLayout ll;
      public List&lt;RssItem&gt; lri;
      public TextView detail;
      Bitmap bitmap;
      private ListView list;
      private RssParseHandler parsehand;
      ImageLoader imageLoader;
  
      @Override
      public void onViewCreated(View view, Bundle savedInstanceState) {
          super.onViewCreated(view, savedInstanceState);
          getListView().setDivider(null);
          list = (ListView)getActivity().findViewById(R.id.list);
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          local = this;
          GetRSSDataTask task = new GetRSSDataTask();
          task.execute("........");
          Log.d("ITCRssReader", Thread.currentThread().getName());
      }
  
      private class GetRSSDataTask extends AsyncTask&lt;String, Void, List&lt;RssItem&gt;&gt; {
          @Override
          protected List&lt;RssItem&gt; doInBackground(String... urls) {
              Log.d("ITCRssReader", Thread.currentThread().getName());
              try {
                  RssReader rssReader = new RssReader(urls[0]);
                  return rssReader.getItems();
  
              } catch (Exception e) {
                  Log.e("ITCRssReader", e.getMessage());
              }
              return null;
          }
  
          @Override
          protected void onPostExecute(final List&lt;RssItem&gt; result) {
  
              final ArrayAdapter&lt;RssItem&gt; adapter = new ArrayAdapter&lt;RssItem&gt;    (getActivity(),R.layout.row_site_two, R.id.nameTxt2, result){
              public View getView(int position, View convertView, ViewGroup parent) {
  
                  LayoutInflater inflater = LayoutInflater.from(getActivity());
                  convertView = inflater.inflate(R.layout.row_site_two, null, false);
  
                  ImageView left = (ImageView) convertView.findViewById(R.id.img2);
                  TextView txt = (TextView) convertView.findViewById(R.id.nameTxt2);
                  String bit = result.get(position).getThumb();
  
                  DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
                          .cacheOnDisc(true).cacheInMemory(true)
                          .imageScaleType(ImageScaleType.EXACTLY)
                          .displayer(new FadeInBitmapDisplayer(300)).build();
  
                  ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
                          getActivity().getApplicationContext())
                          .defaultDisplayImageOptions(defaultOptions)
                          .memoryCache(new WeakMemoryCache())
                          .discCacheSize(100 * 1024 * 1024).build();
  
                  ImageLoader.getInstance().init(config);
  
  
                  imageLoader = ImageLoader.getInstance();
                  DisplayImageOptions options = new DisplayImageOptions.Builder().cacheInMemory(true)
                          .cacheOnDisc(true).resetViewBeforeLoading(true)
                          .build();
  
                  Random rnd = new Random();
                  // left.setImageAlpha(200);
                  // int color = Color.argb(255, rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256));
                  // left.setColorFilter(color, PorterDuff.Mode.LIGHTEN);
  
                  imageLoader.displayImage(result.get(position).getThumb(), left, defaultOptions);
                  txt.setText(result.get(position).getTitle());
  
                  return convertView;
              }
  
          };
  
  
          setListAdapter(adapter);
  
          ListView listv = getListView();
  
  
          listv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  String s = adapter.getItem(position).getContent();
                  String t = adapter.getItem(position).getTitle();
                  String b = adapter.getItem(position).getThumb();
  
  
  
                  int pvalue = position;
                  Intent i = new Intent(getActivity(), DetailedInfo.class);
                  i.putExtra("bitmap", b);
                  i.putExtra("pos", "" + s);
                  i.putExtra("tit", t);
                  startActivity(i);
              }
  
          });
      }
  }
  </code></pre>
  
  <p>row_site_two.xml:</p>
  
  <p></p>
  
  <pre><code>&lt;ImageView
      android:id="@+id/img2"
      android:layout_width="250dp"
      android:layout_height="250dp"
      android:layout_alignParentLeft="true"
      android:layout_alignParentRight="true"
      android:scaleType="fitXY"
      android:clickable="true" /&gt;
  
  &lt;ImageView
      android:id="@+id/imageView2"
      android:layout_width="match_parent"
      android:layout_height="40dp"
      android:layout_alignParentBottom="true"
      android:layout_marginBottom="30dp"
      android:layout_centerHorizontal="true"
      android:background="#4800695c"/&gt;
  
  &lt;TextView
      android:id="@+id/nameTxt2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_marginBottom="30dp"
      android:layout_centerHorizontal="true"
      android:textColor="#ffffffff"
      android:textSize="16dp"
      android:textIsSelectable="true"
       /&gt;
  </code></pre>
  
  <p></p>