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

Block the gesture when touch it from NavigationBar or StatusBar. #3337

Merged

Conversation

AioiLight
Copy link
Contributor

What is it?

  • Bug fix
  • Feature

Long description of the changes in your PR

We can view them by swiping up from the navigation bar or swiping down from the status bar, without having to tap the screen on the player screen.

Until now, when you made such a move, the gesture got in the way and it didn't work well.

This PR will allow you to block gestures initiated from the navigation bar and status bar.

untitled_1_1

Testing apk

blocking-gesture.zip

Agreement

@TobiGr TobiGr added the player Issues related to any player (main, popup and background) label Apr 2, 2020
@XiangRongLin
Copy link
Collaborator

Works as intended and code looks good to me.
Only thing i would change is putting the 2 private methods below where they are used. The current position seems off.

@AioiLight
Copy link
Contributor Author

Oops, I moved the method to the correct position.

@TobiGr TobiGr added this to the 0.19.4 milestone Apr 24, 2020
Copy link
Contributor

@wb9688 wb9688 left a comment

Choose a reason for hiding this comment

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

The code looks fine, other than that small thing. Could you squash your commits?

@AioiLight AioiLight requested a review from wb9688 May 8, 2020 05:30
wb9688
wb9688 previously approved these changes May 9, 2020
Copy link
Contributor

@wb9688 wb9688 left a comment

Choose a reason for hiding this comment

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

It's good now, but again: could you squash your commits?

Edit: I did it myself

Follow Checkstyle

Move to PlayerGestureListener from VideoPlayerImpl

Update app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java

Co-authored-by: wb9688 <46277131+wb9688@users.noreply.github.com>
@wb9688 wb9688 force-pushed the blocking-gesture-when-touch-from-navbar branch from 603751a to 0abd2bc Compare May 9, 2020 08:13
@TobiGr TobiGr merged commit b3eadb5 into TeamNewPipe:dev May 9, 2020
This was referenced May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants