title: Android ImageButton click not working sometimes
body: <p>I'm using ImageButton in my xml, like this:</p>
  
  <pre><code>&lt;FrameLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerVertical="true"
          &gt;
          &lt;ImageButton
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/imageButton_home"
              android:src="@drawable/home_icon"
              android:background="@android:color/transparent"
              android:layout_alignParentLeft="true"
              android:layout_marginLeft="10dp"
              android:focusableInTouchMode="false"
              android:focusable="false"
              android:clickable="true"
              /&gt;
  
          &lt;ImageButton
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/imageButton_back"
              android:src="@drawable/back_icon"
              android:layout_alignParentLeft="true"
              android:layout_marginLeft="10dp"
              android:background="@android:color/transparent"
              android:visibility="gone"
              android:focusableInTouchMode="false"
              android:focusable="false"
              android:clickable="true"
              /&gt;
  
      &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>Only one image button is visible at a time.
  And I'm capturing the click in my java code as following:</p>
  
  <pre><code>  imageButtonHome.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent homeIntent = new Intent(SettingsActivity.this, MainActivity.class);
              startActivity(homeIntent);
          }
      });
  </code></pre>
  
  <p>This works fine sometimes, but not always.
  I see this line in my logcat whenever I click on image button:</p>
  
  <pre><code>D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
  </code></pre>
  
  <p>This line always shows up, even when my ImageButton click action is not performed.</p>
  
  <p>But when my ImageButton click works correctly, this other line adds up to log:</p>
  
  <pre><code> D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
   D/AbsListView: Get MotionRecognitionManager
  </code></pre>
  
  <p>I want my image button to work every time. Please help.</p>