title: Disable swiperefreshlayout and scrollview when interacting with a map fragment
body: <p>I currently have the following layout high level layout</p>
  
  <pre><code>&lt;android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/swipeRefresh"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;ScrollView
          android:id="@+id/scrollView"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:fillViewport="true"&gt;
  
          &lt;android.support.constraint.ConstraintLayout xmlns:tools="http://schemas.android.com/tools"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"
              tools:layout_editor_absoluteX="0dp"
              tools:layout_editor_absoluteY="81dp"&gt;
  
              ...
  
              &lt;FrameLayout
                  android:id="@+id/location_container"
                  android:layout_width="0dp"
                  android:layout_height="0dp"
                  android:layout_marginEnd="8dp"
                  android:layout_marginLeft="8dp"
                  android:layout_marginRight="8dp"
                  android:layout_marginStart="8dp"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintHorizontal_bias="0.0"
                  app:layout_constraintLeft_toLeftOf="parent"
                  app:layout_constraintRight_toRightOf="parent"
                  app:layout_constraintTop_toBottomOf="@+id/textView3"
                  app:layout_constraintVertical_bias="0.0"&gt;
  
                  &lt;fragment
                      android:id="@+id/fragment_location"
                      android:name="com.nissanshare.vehicleinfo.VehicleLocationFragment"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:layout_marginTop="8dp"
                      android:tag="fragment_vehicleInfo"
                      tools:layout="@layout/fragment_vehicle_info_location" /&gt;
  
                  &lt;View
                      android:id="@+id/transparent_view"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@android:color/transparent" /&gt;
              &lt;/FrameLayout&gt;
  
              ...
  
          &lt;/android.support.constraint.ConstraintLayout&gt;
      &lt;/ScrollView&gt;
  &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;
  </code></pre>
  
  <p>And in my code I have the following method</p>
  
  <p><code>mTouchInterceptor</code> is the <code>transparent_view</code> in the layout</p>
  
  <pre><code>private void setupTouchInterceptor() {
          mTouchInterceptor.setOnTouchListener(new View.OnTouchListener() {
  
              @Override
              public boolean onTouch(View v, MotionEvent event) {
                  int action = event.getAction();
                  switch (action) {
                      case MotionEvent.ACTION_DOWN:
                          Log.d(TAG, ".onTouch:DOWN");
                          // Disallow ScrollView to intercept touch events.
                          mScrollView.requestDisallowInterceptTouchEvent(true);
                          mSwipeRefreshLayout.requestDisallowInterceptTouchEvent(true);
  
                          return false;
  
                      case MotionEvent.ACTION_UP:
                          Log.d(TAG, ".onTouch:UP");
                          // Allow ScrollView to intercept touch events.
  
                          mScrollView.requestDisallowInterceptTouchEvent(false);
                          mSwipeRefreshLayout.requestDisallowInterceptTouchEvent(false);
  
                          return true;
  
                      case MotionEvent.ACTION_MOVE:
                          Log.d(TAG, ".onTouch:MOVE");
                          mScrollView.requestDisallowInterceptTouchEvent(true);
                          mSwipeRefreshLayout.requestDisallowInterceptTouchEvent(true);
  
                          return false;
  
                      default:
                          return true;
                  }
              }
          });
      }
  </code></pre>
  
  <p>This is the same code I use when just using scrollview without the SwipeRefreshLayout and it works flawlessly. However when adding the SwipeRefreshLayout, it seems that it doesn't respect the call to <code>requestDisallowInterceptTouchEvent</code>. How do I prevent the SwipeRefreshLayout from refreshing when interacting with the map.</p>