Changing the Chromecast icon color by styling MediaRouteButton
Ever since Chromecast has been added as a standard functionality to mobile applications, designers want to apply a brand color to the standard cast icon.
The only way (without the support library) is to copy assets from mediarouter library, edit as needed and override the default assets or style.
While a simple fix, it’s time consuming and over engineering for a simple color change.
Android developers stopped hacking with overrides when the v7 mediarouter library added setRemoteIndicatorDrawable to the MediaRouteButton.
The second step on the right path is the setTint method, the problem is the MediaRouteButton’s drawable is not accessible in the standard way.
But it can be done, if one knows the inner workings of the support library:
Put the two together and a simple, no hacks, no custom components solution emerges: