I'm using mediarouter-v7
v23.1.1 to show a chromecast / media router chooser dialog. Now I try to style this thing - while I could change the background color and list item text style with this:
<style name="Theme.MediaRouter.Light">
<item name="android:background">@color/orange</item>
<item name="mediaRouteChooserPrimaryTextStyle">@style/my_custom_style</item>
</style>
I was not able to override the style of the dialog's title. This and other attempts were not successful:
<style name="Theme.MediaRouter.Light">
<item name="android:windowTitleStyle">@style/my_title_style</item>
</style>
<style name="my_item_style">
<item name="android:textColor">@color/blue</item>
</style>
As I understood it, a dialog has its own window, therefore android:windowTitleStyle
of the (dialog) theme that I override in my custom styles should be applied, but its not. I also looked into the implementation of the mediarouter dialog to see if they do anything fancy (like hiding the window and adding a custom element as their title), but they do not, they simply call setTitle(...)
on the Dialog
instance.
What am I doing wrong?