MaterialCardView crashes with material:1.1.0

后端 未结 7 1719
青春惊慌失措
青春惊慌失措 2021-01-01 12:15

I am using MaterialCardView as my cardview layout. Now, Android-studio started showing me that instead of current implementation \"com.google.android.mat

相关标签:
7条回答
  • 2021-01-01 13:01

    try latest version

    implementation 'com.google.android.material:material:1.2.0-alpha03'
    

    style.xml:

    <style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
            <!-- Customize your theme here. -->
            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>
        </style>
    

    in your xml:

    <com.google.android.material.card.MaterialCardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    
    </com.google.android.material.card.MaterialCardView>
    
    0 讨论(0)
提交回复
热议问题