3

In cast v3, how can I change the color of the "Stop Casting" button manually?

I am able to change the styling for the Cast Dialog or Media Router for everything else, but the "Stop Casting" button seems to switch to black / blue depending on what background color is.

My theme:

<style name="CustomMediaRouterTheme" parent="Theme.MediaRouter">
    <!-- Other elements here -->
    <item name="mediaRouteButtonStyle">@style/CustomMediaRouteButtonStyle</item>
    <item name="colorBackgroundFloating">@color/colorTertiaryDark</item>
</style>
  • AFAIK, the only style applicable would be light and dark. But as this related [SO post](https://stackoverflow.com/a/24313878/5995040), you can check some general styling for chromecast. If that didn't help you can file a inquiry to [google cast](https://github.com/googlecast/CastVideos-android/issues) regarding custom styling. Hope this helps. – Mr.Rebot Sep 02 '17 at 21:14

1 Answers1

1

You have to update your theme. The "STOP CASTING" button follows the accent color of your activity theme and the background color of controller part follows the primary color of your activity theme. But, sometimes the primary color is used as the "STOP CASTING" button color. It depends on the app theme (light or dark) and primary color. If the primary color is distinguishable, seems like the accent color get overridden.

  • App theme (light or dark): main theme of the dialog
  • Primary color: the background color of the controller
  • Accent color: the text color of "STOP CASTING" (this can be overridden by primary color in certain case)
The Finest Artist
  • 3,150
  • 29
  • 34