-
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
Visual bug with UI with StyledPlayerView #7898
Comments
Do you have theme for TextViews in your app? If so, can you share the theme definition? Thanks! |
The only style that has this green color (which is called nature_interaction in the codebase)
But these styles are not configured into the global theme they need to be set manually in XML like this
Global theme
That green color is also the color primary for the global theme. |
I have the same problem. I can override the primary color in the player theme which fixes the wrong color issue, but i can't work around the not centered text. Version of ExoPlayer being used: 2.12.1 |
@1nsun - I think we need to make sure that the icons are not picking up the primary color. Is it possible they're also picking up some default padding or something, which is affecting the text positioning? |
I believe that this issue is happening because of the Material Design Components library. I am seeing the same issue with the numbers being up higher than they should on the app I'm currently working on that uses MDC. I just tried making a small test app without MDC and I do not see the issue with misaligned text. MDC does something where it intercepts XML inflation. It takes |
I have the same problem, just like @petitJAM mentioned it because we use material theme that causing style on the button change. Workaround for me is that I create a custom theme with
OR As the button use the MaterialButton theme, create a custom theme that inherit from
After that apply that theme to your ExoPlayerView theme,
Using the second option, you don't need to change the theme of the Activity in |
Thanks @uberchilly @petitJAM @fuadreza for your help diagnosing this. I think we can work around this in the ExoPlayer library by:
The second one is awkward because the ExoPlayer UI module doesn't have a dependency on the Material library, which means we can't just use Material's |
#minor-release Issue: #7898 PiperOrigin-RevId: 343251455
This is hopefully fixed by the change ref'd above. We'll include this in |
Issue: #7898 PiperOrigin-RevId: 343251455
[REQUIRED] Issue description
Visual bug with rewind and fast forward buttons, description text not in the center, and button icons not white.
[REQUIRED] Reproduction steps
Added StyledPlayerView to the layout like this
[REQUIRED] Link to test content
Not applicable
[REQUIRED] A full bug report captured from the device
[REQUIRED] Version of ExoPlayer being used
2.12.0
[REQUIRED] Device(s) and version(s) of Android being used
Oneplus 6t, Android 10
The text was updated successfully, but these errors were encountered: