Add asset for exo_controls_shuffle_off rather than applying transparency in code
See original GitHub issueBefore filing a question:
how to change color of Shuffle and Repeat Toggle button in exo_playback_control_view when selected
The way to change color for Shuffle button is
<ImageButton
android:layout_weight="1"
android:id="@id/exo_shuffle"
android:tint="@android:color/holo_orange_light"
style="@style/ExoMediaButton.Shuffle" />
when its clicked the transparency changes to 0.3f
But I want to change the color to White , when the button is selected
how can this be done
thanks in advance
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The logic to apply the transparency is in code. You can not change this easily without changing the source code of PlayerControlView.
The style of the button is defined in a style. You can customize the existing style or apply another style. It’s possible to change the background color of the button or the tint of the icon on the button:
For example:
With the style above, the background of the button is red and the shuffle icon is tinted green. Besides my color choice being ugly, that works fine and you can customize as you want.
There is a blog post around customizing the UI on Medium if you want more details about customizing the UI.
Fixed by: https://github.com/google/ExoPlayer/commit/a12c6641d9a3c49a6d36ab89da7ac6888aedcfa6, https://github.com/google/ExoPlayer/commit/e4eb6b7ea90cf273591f47a9ed19f2439d74a8f7, https://github.com/google/ExoPlayer/commit/e567f8edd0ddb5075a8fccd88abb4171eaa5a25c