Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
Version used: 1.6.0
Devices/Android versions reproduced on: Any
I'm using a MediaRouteButton in a screen with dynamic colors based on an image on the screen.
I'd love a setButtonTint() method to apply a custom color to the button. Since I don't know the color ahead of time, I am unable to use the XML theme attributes for tinting.
I'm also planning on manually creating the MediaRouteButton via the constructor taking a context as I'm not inflating it via XML as I move to compose.
Note I manually worked around this, by setting mButtonTint via reflection. Since you allow the drawable itself to be updated manually, it seems like an oversight that the tint is also not able to be set manually if the default drawable is acceptable.
Also it would be easier to ensure the tint is properly applied to the drawable in all instances with a method directly on the view itself vs reflection which is tied to the internals of the class.