title: Gestures not working when using DrawerLayout in Android app
body: <p>I have an Android app with a single Activity. This activity uses this layout:</p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;!-- The main content view --&gt;
      &lt;FrameLayout
          android:id="@+id/content_frame"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
      &lt;!-- The navigation drawer --&gt;
      &lt;ListView android:id="@+id/left_drawer"
          android:layout_width="240dp"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:choiceMode="singleChoice"
          android:divider="@android:color/transparent"
          android:dividerHeight="0dp"
          android:background="#111"/&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>Then, in my source I have two gesture detectors defined in the constructor:</p>
  
  <pre><code>mDetector = new GestureDetectorCompat(this, new CustomGestureListener());
  mScaleDetector = new ScaleGestureDetector(this, new CustomScaleGestureListener());
  </code></pre>
  
  <p>And I'm overriding onTouchEvent this way:</p>
  
  <pre><code>@Override
  public boolean onTouchEvent(MotionEvent event) {
      if (event.getPointerCount() &gt; 1) {
          this.mScaleDetector.onTouchEvent(event);
      } else {
          this.mDetector.onTouchEvent(event);
      }
      return super.onTouchEvent(event);
  }
  </code></pre>
  
  <p>My problem is that gestures are not detected (although I can open the drawer with a swipe gesture). This problem doesn't occur if I replace the drawerlayout with, for example, a linear layout, so the cause is the navigation drawer. What am I doing wrong?</p>