title: Listview onClickListener is not working in Drawer Layout
body: <p>I am making a drawer having <code>ListView</code> in it. But surprisingly its not getting any <code>onClickListener</code> fired when I click on any list item.</p>
  
  <p><strong>I have tried these things till now</strong></p>
  
  <ul>
  <li>Making a <code>ArrayAdapter</code> for <code>ListView</code> and get simply <code>list.onItemClickListener</code> and <code>list.onClickListener</code> too.</li>
  <li>A custom adapter with a implemented <code>OnClickListener</code></li>
  </ul>
  
  <p>Also for layouts even, I have tried these ways </p>
  
  <ul>
  <li>A layout with a parent <code>TextView</code></li>
  <li>Layout with <code>RelativeLayout</code> as parent</li>
  </ul>
  
  <p>Trying each case from above, I got nothing working till now. I guess that code is working well but might be some issue with layout, but trying everything I am still clueless.</p>
  
  <p>Here is my current item layout</p>
  
  <pre><code>&lt;RelativeLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:descendantFocusability="blocksDescendants"&gt;
  
      &lt;TextView
          android:id="@+id/text"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignBottom="@+id/image"
          android:layout_alignParentRight="true"
          android:layout_alignParentTop="true"
          android:layout_toRightOf="@+id/image"
          android:text="@string/app_label"
          android:paddingTop="14dp"
          android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
      &lt;ImageView
          android:contentDescription="@string/app_label"
          android:id="@+id/image"
          android:layout_width="50dp"
          android:layout_height="50dp"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:padding="10dp"
          android:src="@drawable/thumb" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is my Custom Adapter</p>
  
  <pre><code>/****** Depends upon data size called for each row , Create each ListView row *****/
  @SuppressLint("SimpleDateFormat")
  public View getView(final int position, View convertView, ViewGroup parent) {
      View vi = convertView;
      final ViewHolder holder;
  
      if (convertView == null) {
  
          /****** Inflate tabitem.xml file for each row ( Defined below ) *******/
          vi = inflater.inflate(R.layout.drawer_list_item, null);
  
          /****** View Holder Object to contain tabitem.xml file elements ******/
  
          holder = new ViewHolder();
          holder.text = (TextView) vi.findViewById(R.id.text);
          holder.image = (ImageView) vi.findViewById(R.id.image);
  
          /************ Set holder with LayoutInflater ************/
          vi.setTag(holder);
  
      } else {
          holder = (ViewHolder) vi.getTag();
      }
  
      if (data.size() &lt;= 0) {
          holder.text.setText("No Music Found!");
  
      } else {
          tempValues = null;
          tempValues = (ListModel) data.get(position);
          String txt = tempValues.getCompanyName().toString();
          holder.text.setText(txt);
          vi.setOnClickListener(new OnItemClickListener(position));
          // Set Values and listeners her
  
      }
  
      return vi;
  }
  
  /********* Called when Item click in ListView ************/
  private class OnItemClickListener implements OnClickListener {
      private int mPosition;
  
      OnItemClickListener(int position) {
          mPosition = position;
      }
  
      @Override
      public void onClick(View arg0) {
          Toast.makeText(activity, "rgrg", Toast.LENGTH_SHORT).show();
          HomeActivity sct = (HomeActivity) activity;
          sct.onDrawerItemClick(mPosition);
      }
  }
  
  @Override
  public void onClick(View arg0) {
      // Default onClick
      Toast.makeText(activity, "rgrg", Toast.LENGTH_SHORT).show();
  
  }
  
  @Override
  public boolean onItemLongClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
          long arg3) {
      Log.i("Long", "msg");
      return true;
  }
  </code></pre>
  
  <p>And here is my activity</p>
  
  <pre><code>mPlanetTitles = getResources().getStringArray(R.array.planets);
      mDrawerList = (ListView) findViewById(R.id.left_drawer);
  
      // Set the adapter for the list view
      setListData();
      DrawerAdapter adapter = new DrawerAdapter(this,
              CustomListViewValuesArr, getResources());
      mDrawerList.setAdapter(adapter);
      mDrawerList.setClickable(true);
  </code></pre>
  
  <p>Here is a listener in activity even</p>
  
  <pre><code>public void onDrawerItemClick(int mPosition) {
      // TODO Auto-generated method stub
      Toast.makeText(getApplicationContext(), "fgsg", Toast.LENGTH_SHORT).show();
  }
  </code></pre>
  
  <p>I am <strong>getting no Log and no Toast</strong> which shows that nothing is clicked. After trying a lot, decided to get some help from you guys!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have did some further look up to see what happening and put a <code>button</code> in <code>listview</code>. In drawer the button is not even getting <code>onPressed</code> colors and hovers on pressing it. At all, the layout is very unresponsive or like not giving any feedback.</p>