title: onClick not triggering when button is in LinearLayout on Android
body: <p>So I'm trying to make something similar to how snapchat does the options menu where you slide down and you can still see the camera in the background. I won't post all the code, but I've debugged what it is that's causing a problem. I'm a noob to android dev, but I've done some java programming before.</p>
  
  <p>This is my xml</p>
  
  <pre><code>&lt;me.dontenvy.videotest.MainMenu xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="#000"
      android:orientation="vertical"
      android:animateLayoutChanges="true"
      android:id="@+id/main_menu"&gt;
  
  &lt;!-- this is for the camera --&gt;
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/camera_container"&gt;
  
      &lt;TextureView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/texture"
          android:animateLayoutChanges="true"/&gt;
  
  &lt;/RelativeLayout&gt;
  
  &lt;!-- this is for the overlay menu --&gt;
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/slide_menu"
      android:animateLayoutChanges="true"
      android:background="@drawable/transparent_background"&gt;
  
      &lt;Button
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@drawable/clear_background"
          android:layout_alignParentBottom="true"
          android:id="@+id/slide_button"/&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="horizontal"&gt;
  
          &lt;Button
              android:layout_width="@dimen/circle_nav_button_diameter"
              android:layout_height="@dimen/circle_nav_button_diameter"
              android:background="@drawable/circle_button"
              android:backgroundTint="#050"
              android:id="@+id/take_image_nav_button"/&gt;
      &lt;/LinearLayout&gt;
  &lt;/RelativeLayout&gt;
  &lt;/me.dontenvy.videotest.MainMenu&gt;
  </code></pre>
  
  <p>I add the onClick listener within my MainMenu.java class which extends RelativeLayout. Here is a gist with the rest of the code <a href="https://gist.github.com/colmex/1bd19dd2cfc400b2f870" rel="nofollow">https://gist.github.com/colmex/1bd19dd2cfc400b2f870</a></p>
  
  <p>The issue is that when the @id/take_image_nav_button is in the LinearLayout, the onClick action doesn't work, when I take it out of it's LinearLayout, the onClick action does work. It feels like the LinearLayout is somehow blocking the click. I've tried a lot of things I've found on stackoverflow and other googling, but nothing seems to fix it. </p>