Skip to content

Commit

Permalink
Two finger gesture: Less code lines
Browse files Browse the repository at this point in the history
  • Loading branch information
vkay94 committed Oct 11, 2020
1 parent f6925fc commit f8cd6af
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ public boolean onInterceptTouchEvent(@NonNull final CoordinatorLayout parent,
// The interception listens for the child view with the id "fragment_player_holder",
// so the following two-finger gesture will be triggered only for the player view on
// portrait and for the top controls (visible) on landscape.
setSkipCollapsed(event.getPointerCount() == 2);
if (event.getPointerCount() == 2) {
// Skip the collapsed state during pulling
setSkipCollapsed(true);
return super.onInterceptTouchEvent(parent, child, event);
} else {
setSkipCollapsed(false);
}

// Don't need to do anything if bottomSheet isn't expanded
Expand Down

0 comments on commit f8cd6af

Please sign in to comment.