title: How to make a Relativelayout clickable?
body: <p>I have a layout like this</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/mainLayout"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:addStatesFromChildren="true"
      android:clickable="true"
      android:duplicateParentState="true"
      android:focusable="true"
      android:paddingBottom="10dip" &gt;
  
      &lt;ImageView
          android:id="@+id/imagView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_centerVertical="true"
          android:focusable="false"
          android:background="@drawable/imageView_bg"
          android:focusableInTouchMode="false" /&gt;
  
      &lt;Button
          android:id="@+id/button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerVertical="true"
          android:layout_marginLeft="18dip"
          android:background="@drawable/button_bg"
          android:clickable="false"
          android:focusable="false"
          android:focusableInTouchMode="false"
          android:gravity="left|center_vertical"
          android:paddingLeft="25dip"
          android:textColor="#ffffff"
          android:textSize="20dip" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>button_bg.xml</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
          &lt;item android:drawable="@drawable/btn_pressed" 
              android:state_pressed="true"/&gt;
          &lt;item android:drawable="@drawable/btn_normal"/&gt;
  
      &lt;/selector&gt;
  </code></pre>
  
  <p>imageView_bg.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item android:drawable="@drawable/img_pressed" 
          android:state_pressed="true"/&gt;
      &lt;item android:drawable="@drawable/img_normal"/&gt;
  
  &lt;/selector&gt;
  </code></pre>
  
  <p>The image view and button have pressed images.when the user clicks on the view ,wants to press both imageview and button(Showing pressed images).But it does not show pressed images. How to achieve this? Where is the problem?</p>
  
  <p>Thanks in advance</p>