title: android onClick for imageview not fired
body: <p>I have a common layout which I use in all my activities. In the title layout, I have an imageview included and there is an onclick method specified in the xml layout for this imageview.</p>
  
  <p>In one of my activities, the onclick for this imageview is not fired in the java code. Following is the layout of the activity I refer to:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent" &gt;
  
  &lt;LinearLayout
      android:id="@+id/bottom_layout_main"
      android:layout_width="fill_parent"
      android:layout_height="50dp"
      android:layout_alignParentBottom="true"
      android:orientation="horizontal"
      android:padding="5dp" &gt;
  
      &lt;RelativeLayout
          android:id="@+id/btn_layout_main"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:gravity="center"
          android:orientation="horizontal" &gt;
  
          &lt;Button
              android:id="@+id/exit_createprofile"
              android:layout_width="100dp"
              android:layout_height="50dp"
              android:layout_marginRight="5dp"
              android:background="@drawable/custom_button"
              android:onClick="onCreateExitClick"
              android:text="Exit"
              android:textSize="14dp" /&gt;
  
          &lt;Button
              android:id="@+id/save"
              android:layout_width="100dp"
              android:layout_height="50dp"
              android:layout_marginLeft="5dp"
              android:layout_toRightOf="@id/exit_createprofile"
              android:background="@drawable/custom_button"
              android:onClick="onCreateSaveClick"
              android:text="Save"
              android:textSize="14dp" /&gt;
      &lt;/RelativeLayout&gt;
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:id="@+id/top_layout"
      android:layout_width="fill_parent"
      android:layout_height="50dp"
      android:layout_alignParentTop="true"
      android:layout_weight="1"
      android:background="@color/light_grey"
      android:gravity="top"
      android:orientation="horizontal" &gt;
  
      &lt;include
          android:id="@+id/includeTitle"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          layout="@layout/titlebar_layout" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;ScrollView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/scrollView"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:paddingTop="40dp" &gt;
  
      &lt;br.com.dina.ui.widget.UITableView
          android:id="@+id/profileList_create"
          style="@style/UITableView"
          android:layout_height="wrap_content" /&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <p>and the layout specified in include is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  style="@style/list_item_top"
  android:layout_width="match_parent"
  android:layout_height="60dp"
  android:background="@color/background_grey"
  android:orientation="horizontal" &gt;
  
  &lt;ImageView
      android:id="@+id/imgBack"
      android:layout_width="28dp"
      android:layout_height="28dp"
      android:onClick="onBackClick"
      android:src="@drawable/arrow_back" /&gt;
  
  &lt;TextView
      android:id="@+id/txtTitle"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:gravity="center_horizontal"
      android:textColor="@android:color/black"
      android:textStyle="bold" 
      android:textSize="18sp" /&gt;
  
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I have even tried, using the following code in the activity, but still, the onclick is not fired:</p>
  
  <pre><code>backImage = (ImageView)layout.findViewById(R.id.imgBack);
      backImage.setClickable(true); 
      backImage.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              Toast.makeText(getApplicationContext(), "Title back clicked", Toast.LENGTH_SHORT).show();
          }
        });
  </code></pre>
  
  <p>I am left with no clues as to why this onclick is not getting fired. Any help is much appreciated.</p>
  
  <p>Here is my screen:</p>
  
  <p><img src="https://i.stack.imgur.com/Rvkqa.png" alt="enter image description here"></p>