title: Swiping from left to right with viewpager and navigation drawer
body: <p>I have a viewpager and a navigation drawer. Both do an action on a horizontal swipe, but how can I control which one is in charge of the swipe action?</p>
  
  <p>My viewpager:</p>
  
  <pre><code>Fragment[] allPictures = new Fragment[getNrPictures()];
  APicturePageAdapter adapter = new APicturePageAdapter(super.getSupportFragmentManager(), allPictures);
  vP = (ViewPager) findViewById(R.id.picPage);
  vP.setAdapter(adapter);
  </code></pre>
  
  <p>Via swiping from right to left I can browse through the pictures. Works fine.
  Then I added a navigation drawer:</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;LinearLayout
          android:id="@+id/PicturePageContentLayout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginBottom="2dp"
          android:orientation="vertical" &gt;
  
          .......
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/left_drawer_ll"
          android:layout_width="300dp"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:background="@android:color/white"
          android:orientation="vertical" &gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical" &gt;
  
              &lt;TextView
                 ... content
              &lt;/TextView&gt;
  
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Opening and closing the drawer works fine, everything seems to be working. However, when I touch the drawer and swipe to the left I want the drawer to close itself and not the viewpager to flip to the previous picture. How can I control who is in charge of the onTouch event?</p>
  
  <p>Thanks for any help.</p>