Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two finger to close player gesture #4476

Merged
merged 2 commits into from
Oct 11, 2020

Conversation

vkay94
Copy link
Contributor

@vkay94 vkay94 commented Oct 10, 2020

What is it?

  • Bug fix (user facing)
  • Feature (user facing)
  • Code base improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This PR adds a 2-finger-touch gesture to the CustomBottomSheetBehavior to dismiss/close the player when the player is pulled down with two fingers.

Fixes the following issue(s)

Testing apk

app-debug-two-finger-close-player.zip

Agreement

@opusforlife2 opusforlife2 added feature request Issue is related to a feature in the app player Issues related to any player (main, popup and background) labels Oct 10, 2020
Stypox
Stypox previously approved these changes Oct 11, 2020
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, it works as expected, and I agree with #4469
@avently can you confirm this is the correct implementation?
Thank you!

@avently
Copy link
Contributor

avently commented Oct 11, 2020

@Stypox it can be written like this:

setSkipCollapsed(event.getPointerCount() == 2);
if (event.getPointerCount() == 2) {
return super.onInterceptTouchEvent(parent, child, event);
}

Just something with less code. Other than that looks ok for me.

@vkay94
Copy link
Contributor Author

vkay94 commented Oct 11, 2020

Okay, I've simplified the code snippet.

@Stypox Stypox merged commit ae33c6c into TeamNewPipe:dev Oct 11, 2020
@Stypox
Copy link
Member

Stypox commented Oct 11, 2020

Thank you @vkay94 @avently :-D

This was referenced Nov 10, 2020
@vkay94 vkay94 deleted the two-finger-to-close-player branch December 2, 2020 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 finger swipe to close player
4 participants