-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Separate player gesture logic and UI #4587
Separate player gesture logic and UI #4587
Conversation
7a5de5d
to
e97f71c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me, I also did some testing and everything worked as expected. Thank you!
return true; | ||
if (portion == DisplayPortion.LEFT) { | ||
playerImpl.onFastRewind(); | ||
} else if (portion == DisplayPortion.RIGHT) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add here else if (portion == DisplayPortion.MIDDLE) { playerImpl.onPlayPause(); }
, so that a double tap in the middle changes the playing state, as it did before #2907? Or will you do this in a future PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I missed this middle gesture somehow., my bad. I'll add it again (or if you'd like to you can do it since you're authorized) :')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'm gonna do it and then merge
e97f71c
to
347566c
Compare
What is it?
Description of the changes in your PR
This PR separates the logic behind the player gestures (for example popup position observation) and the UI (for example show/hide controls and adjusting the brightness during scrolling) This way it is more readable.
BasePlayerGestureListener
which handles the logic and provides abstract methods for listeningPlayerGestureListener
contains only visual codeDisplayPortion
enum class (LEFT
,MIDDLE
,RIGHT
for double tap,LEFT_HALF
,RIGHT_HALF
for scrolling)APK testing
app-debug-0.20.2-fix.zip
Due diligence