Search code examples
androidandroid-gradle-pluginandroid-support-libraryandroid-design-libraryandroid-cast-api

Android support MediaRouter kills support design


I am developing an app with Cast integration. I am able to set up a cast button and I'm even able to cast my app to ChromeCast. However, when I include MediaRouter as a dependency, I get a weird style (or absence of it) for the floating action button.

Here's the properly styled button:

with proper styling

And here's what happens when I add the MediaRouter dependency:

without style

// build.gradle
dependencies {
    // ....

    // Removing the mediarouter fixes the "design" of the toaster, but then crashes app
    implementation 'com.android.support:mediarouter-v7:26.1.0'
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.google.android.gms:play-services-cast-framework:10.0.1'
    implementation 'com.android.support:design:26.1.0'
    // ...

Any thoughts on what might be causing this or on how should I address it?


Solution

  • In any case you can also add a custom style and then try to copy the Material Design style.