title: Android Google Map | Two finger scrolling
body: <p>I am working with Google Map,</p>
  
  <p>My case is that I have a map fragment inside the <strong>ScrollView</strong> and I need to scroll the map only with <strong>two finger</strong> if user touches only one finger map should not work and normal Scroll View should work.</p>
  
  <p>This is what i tried so far  - </p>
  
  <pre><code>transparent_image.setOnTouchListener(new View.OnTouchListener() {
  
                  @Override
                  public boolean onTouch(View v, MotionEvent event) {
                      int action = event.getAction();
                      switch (action &amp; MotionEvent.ACTION_MASK) {
                          case MotionEvent.ACTION_POINTER_DOWN:
                              showMessage("Double finger ACTION_POINTER_DOWN");
  
                              googleMap.getUiSettings().setScrollGesturesEnabled(false);
                              scroll_view.requestDisallowInterceptTouchEvent(true);
                              return true;
                          case MotionEvent.ACTION_POINTER_UP:
                              showMessage("Double finger ACTION_POINTER_UP");
  
                              googleMap.getUiSettings().setScrollGesturesEnabled(true);
  
                              scroll_view.requestDisallowInterceptTouchEvent(false);
  
                              return true;
  
                          default:
                              return true;
                      }
                  }
              });
  </code></pre>