I'm trying to customize castBackground and castProgressBarColor MiniControllerFragment attributes as explained in official documentation: https://developers.google.com/cast/docs/android_sender_advanced
I use the following style for my Activity:
<style name="AppTheme.NoActionBarNoTitle" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="castIntroOverlayStyle">@style/CustomCastIntroOverlay</item>
<item name="castMiniControllerStyle">@style/CustomCastMiniController</item>
</style>
and this is CustomCastMiniController style:
<style name="CustomCastMiniController" parent="CastMiniController">
<item name="castShowImageThumbnail">true</item>
<item name="castTitleTextAppearance">@style/TextAppearance.AppCompat.Subhead</item>
<item name="castSubtitleTextAppearance">@style/TextAppearance.AppCompat.Caption</item>
<item name="castBackground">#FFFFFF</item>
<item name="castProgressBarColor">#FFFFFF</item>
</style>
I am unable to build because these errors:
Error:(2073, 21) No resource found that matches the given name: attr 'castBackground'.
Error:(2074, 21) No resource found that matches the given name: attr 'castProgressBarColor'.
If I remove these two attributes in my CustomCastMiniController style app start successfully.
The attributes castBackground and castProgressBarColor were introduced in a later version of the Google Cast SDK, as indicated in the release notes:
Oktober 24, 2016
- Added ability to customize the style of mini controllers: added
castBackgroundfor setting its background color,castButtonColorto color all buttons used in the mini controller, andcastProgressBarColorto color the progress bar.
So please make sure that you are compiling with the latest release of the Google Cast SDK in your build.gradle file (version 10.0.0 at the time of writing):
dependencies {
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:mediarouter-v7:25.0.1'
compile 'com.google.android.gms:play-services-cast-framework:10.0.0'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With