title: OnItemClickListener Not working in fragment (Multicolumn ListView)
body: <p>I need your help!</p>
  
  <p>I have a main activity that contains 2 fragments (one for the header and one for the multicolumn list), one of the fragments is a ListFragments contains a multicolumn ListView, which is boxed in a scrollable view. This ListFragment overrides the onItemClickListener method. I can scroll the view and everything, but when I click on the listview, the listener is not invoked! </p>
  
  <p>I have tried many different solutions, like trying to block focusability for views, but nothing has worked so far. Maybe you guys can help me out.</p>
  
  <p>The parent activity containing the two fragments:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/LinearLayout1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:weightSum="1"
      android:descendantFocusability="blocksDescendants"
      tools:context=".MainWindow" 
       &gt;
  
      &lt;fragment
          android:id="@+id/headerfragment"
          android:name="lindcom.mobile.estock.fragments.ListHeaderFragment"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:descendantFocusability="blocksDescendants"
           /&gt;
  
      &lt;fragment
          android:id="@+id/unitlistfragment"
          android:name="lindcom.mobile.estock.fragments.UnitsListFragment"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:descendantFocusability="blocksDescendants"
           /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>This is the layout I use for my multicolumn list:</p>
  
  <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:focusable="false"
      android:focusableInTouchMode="false"
      android:descendantFocusability="blocksDescendants" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:weightSum="1" &gt;
  
          &lt;TextView
              android:id="@+id/unitsCol1"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="0.40"
              android:ellipsize="marquee"
              android:maxLines="1"
              android:scrollHorizontally="true"
              android:singleLine="true"
              /&gt;
  
          &lt;TextView
              android:id="@+id/unitsCol2"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="0.40"
              android:ellipsize="marquee"
              android:maxLines="1"
              android:scrollHorizontally="true"
              android:singleLine="true" 
              /&gt;
  
  
          &lt;TextView
              android:id="@+id/unitsCol3"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="0.2"
              android:ellipsize="marquee"
              android:maxLines="1"
              android:scrollHorizontally="true"
              android:singleLine="true" 
              /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>The above layout is populated in an async task, after I have fetched the data:</p>
  
  <pre><code>ListAdapter adapter = new SimpleAdapter(
                      fragment.getActivity().getBaseContext(), this.unitList,
                      R.layout.unit_list_item, new String[] { TAG_OWNER, TAG_NAME,
                              TAG_CONTENT }, new int[] { R.id.unitsCol1, R.id.unitsCol2,
                              R.id.unitsCol3 });
  
  
              fragment.setListAdapter(adapter); // Set the adapter to the listFragment
  </code></pre>
  
  <p>Then for the on click listener, I simply override it in the fragment:</p>
  
  <pre><code>public class UnitsListFragment extends ListFragment {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          // Fetch stuff here
  
      }
  
      @Override
      public void onListItemClick(ListView l, View v, int position, long id) {
  
          String type = l.getItemAtPosition(position).getClass().toString();
  
          Log.d("Item type was", type);
              // THIS IS NEVER INVOKED :(
  
  
      };
  }
  </code></pre>
  
  <p>I have tried so many different things, but maybe you guys can see a simple fix to this, something that I might have overlooked.</p>
  
  <p>Any help would be greatly appreciated! Thanks!</p>