在低版本中設置了 CardElevation 之后 CardView 會自動留出空間供陰影顯示
Lollipop 之后則需要手動設置 Margin 邊距來預留空間
解決:
app:cardUseCompatPadding="true"
需要CardView點擊帶有系統默認ripple效果,添加屬性:
android:clickable="true"
android:foreground="?attr/selectableItemBackground"
http://www.lxweimin.com/p/07097b562acb
https://www.ctolib.com/changliugang-CardView.html