Skip to content

Commit

Permalink
If we've disabled scrolling within the map, then don't capture the to…
Browse files Browse the repository at this point in the history
…uch events. This allows the containing scrollview to perform a scrollview scroll by dragging on the map. (Previously, the map would absorb the touches, and then not scroll the map *or* the scrollview, which was bad.)
  • Loading branch information
mikelambert committed Oct 14, 2016
1 parent 96524b4 commit 7a6febd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -578,13 +578,16 @@ public boolean dispatchTouchEvent(MotionEvent ev) {

switch (action) {
case (MotionEvent.ACTION_DOWN):
this.getParent().requestDisallowInterceptTouchEvent(true);
if (map != null && map.getUiSettings().isScrollGesturesEnabled()) {
this.getParent().requestDisallowInterceptTouchEvent(true);
}
isTouchDown = true;
break;
case (MotionEvent.ACTION_MOVE):
startMonitoringRegion();
break;
case (MotionEvent.ACTION_UP):
// Clear this regardless, since isScrollGesturesEnabled() may have been updated
this.getParent().requestDisallowInterceptTouchEvent(false);
isTouchDown = false;
break;
Expand Down

0 comments on commit 7a6febd

Please sign in to comment.