title: Make layout clickable
body: <p>In my app I have several fragments with different <code>ListView</code>s, but for all them I want to use the same empty view, so I created a separate layout with the empty view and added it to the other layouts using</p>
  
  <pre><code>&lt;include
      android:id="@+id/empty"
      layout="@layout/empty_view"/&gt;
  </code></pre>
  
  <p>Everything works as expected but now I'm trying to make that view clickable so I can reload <code>ListView</code> when the user taps on the empty view, however I can't make it work. Any idea on how to do it?</p>
  
  <p>This is what I have tried so far:</p>
  
  <p>(empty_view.xml)</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:clickable="true"
      android:gravity="center"&gt;
  
      &lt;ImageView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:scaleType="center"
          android:src="@drawable/error_icon"/&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:gravity="center"
          android:textColor="#929292"
          android:textSize="24sp"
          android:text="@string/empty_list_error"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>fragment_list.xml</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:animateLayoutChanges="true"&gt;
  
      &lt;Spinner
          android:id="@+id/spinner_filter"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginRight="@dimen/activity_vertical_margin"
          android:layout_marginLeft="@dimen/activity_vertical_margin"
          android:layout_gravity="center_horizontal"
          android:visibility="gone"/&gt;
  
      &lt;include
          android:id="@+id/empty"
          layout="@layout/empty_view"/&gt;
  
      &lt;ProgressBar
          android:id="@+id/loading_indicator"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:layout_gravity="center"
          android:indeterminate="true"
          style="@android:style/Widget.Holo.ProgressBar.Large"/&gt;
  
      &lt;LinearLayout
          android:id="@+id/list_header"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/primary_color"
          android:padding="@dimen/activity_vertical_margin"
          android:layout_below="@id/spinner_filter"
          android:visibility="gone"&gt;
  
          &lt;TextView
              android:layout_width="0dp"
              android:layout_weight="5"
              android:layout_height="wrap_content"
              android:textColor="@color/white_90pct"
              android:textAllCaps="true"
              android:text="@string/subject_indicator"/&gt;
  
          &lt;View
              android:layout_width="1dp"
              android:layout_height="15dp"
              android:layout_gravity="center_vertical"
              android:background="@color/light_color"/&gt;
  
          &lt;TextView
              android:layout_width="0dp"
              android:layout_weight="1"
              android:layout_height="wrap_content"
              android:singleLine="true"
              android:gravity="end"
              android:textColor="@color/white_90pct"
              android:textAllCaps="true"
              android:text="@string/grade_indicator"/&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;ListView
          android:id="@+id/semesters_list"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@id/list_header"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Java class (onCreateView)</p>
  
  <pre><code>LinearLayout emptyView = (LinearLayout) view.findViewById(R.id.empty);
  emptyView.setOnClickListener(this);
  </code></pre>
  
  <p>I also tried adding the next attributes to the xml but still not working:</p>
  
  <pre><code>android:focusableInTouchMode="true"
  android:focusable="true"
  android:descendantFocusability="blocksDescendants"
  </code></pre>