-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Request: allow PlayerView to be clickable #5433
Comments
I added the following code to the ExoPlayer demo app (in
So I'm not sure there's anything to do here. |
Yeah, I also see that this question is opened. So i'm implemented a work around :) I based my playerView under the view (playerContainer) . It will intercept all touch events including onClick()
|
@ojw28 To me it doesn't work. Tested on Pixel 2 with Android P. |
Ah... It looks like this is fixed already in Leaving this issue open just to track getting the fix cherry-picked into a |
@ojw28 Can you please explain what is the origin of this issue? Why is there even something that changed the default behavior of View being clicked? |
Why don't you look in the referenced commit, if you're interested? |
@ojw28 I see. Thank you |
Also have this 'issue' before, my workaround is also to wrap it by a FrameLayout ... Really appreciate a 'fix' :D. |
Cherry-picked into the 2.9.5 release branch (which isn't released yet, but will be soon). |
Release branch commit: e5bf47e |
Clickable in version 2.9.5. Thanks! |
references: google/ExoPlayer#5433 google/ExoPlayer@0a7745b https://github.com/google/ExoPlayer/blob/0a7745bc03c93709e178c578a4649eb534e8a9e0/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java#L1031 summary: * issue #5433: "Request: allow PlayerView to be clickable" * fix came in commit: 0a7745b * since the ExoPlayer library is now based on a PR from an older fork, this fix is missing * applying only a minimal patch
This is a tiny request.
I've noticed that if I set an
OnClickListener
on thePlayerView
(even if I addandroid:clickable="true" android:focusable="true"
in the layout file), it doesn't respond to click events.Please allow the view to be clickable, maybe even touchable...
The only solution for this, is to set the
OnClickListener
on the container, or a view that's on top of thePlayerView
.The text was updated successfully, but these errors were encountered: