Setting Elevation in XML on AppCompat CardView on Android 5.0

后端 未结 5 2077
梦如初夏
梦如初夏 2020-12-12 16:07

From what I understand, early in the preview stage there seemed to be no way to set elevation in XML only on CardViews without a hack in Java. Now that the offi

5条回答
  •  青春惊慌失措
    2020-12-12 16:28

    If you have this line

    android:hardwareAccelerated="false"
    

    in manifest application tag your shadows were not displayed. try to remove this line

    or use

    android:hardwareAccelerated="true"
    

    This worked for me! I hope it works for you too :)

提交回复
热议问题