官方教程:
卡片控件是一个拥有圆角、阴影的控件。
ardBackgroundColor:
卡片的背景颜色。比如 cardBackgroundColor="#ffffff"。
cardCornerRadius:
卡片的圆角半径。
cardElevation:
设置卡片在 z 轴上的高度,来控制阴影的大小。
contentPadding:
设置卡片的内边距。该属性包括四个值:
contentPaddingLeft 左内边距contentPaddingRight 右内边距contentPaddingTop 上内边距contentPaddingBottom 下内边距foreground:
使用foreground="?selectableItemBackground"属性可以为卡片添加点击效果。