title: how to make Relative layout onclick work?
body: <p>I have a Relative layout as: </p>
  
  <pre><code>    &lt;RelativeLayout
          android:id="@+id/iPay_btn"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:clickable="true"
          android:orientation="horizontal"&gt;
  
          &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:text="· Use iPay"
              android:textColor="#686A86"
              android:textSize="18sp" /&gt;
  
  
          &lt;Button
              android:layout_width="50dp"
              android:layout_height="35dp"
              android:layout_alignParentRight="true"
              android:background="@drawable/i_pay"
              android:textAllCaps="false"
              android:textColor="#ffffff" /&gt;
  
      &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I want my relative layout to perform onCLickListener but does not work.
  I am able to do the setonclicklistener but it works only with the textview part and not for the image.</p>
  
  <pre><code>    btniPay.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              //for ipay
  
          }
      });
  </code></pre>
  
  <p>This works for the text part only but not for the image. Any idea what I might be missing.</p>