MaterialDesign Support¶
Lounge provides Theme.MaterialComponents.Leanback.Bridge
, a theme contains style attributes both required by Leanback and MaterialComponents.
Usage¶
Installation¶
dependencies {
implementation 'jp.co.cyberagent.lounge:lounge-material:$latestVersion'
}
Ensure you are using AppCompatActivity¶
class TvActivity : AppCompatActivity() {
// Set up
}
Change your app theme¶
In your theme xml files:
<style name="Theme.MyApp" parent="Theme.MaterialComponents.Leanback.Bridge">
<!-- ... -->
</style>
In your AndroidManifest.xml
:
<application
android:label="@string/app_name"
android:theme="@style/AppTheme"
>
<activity
android:name=".TvActivity"
/>
</Applications>
Now your can use MaterialComponents in your application.