
老婆保佑,代码无BUG
目录
- 一:属性介绍
- 二: card添加说波纹效果
引用
compile 'com.android.support:cardview-v7:23.4.0'
一:属性介绍
| 属性名称 | 说明 |
|---|---|
| app:cardBackgroundColor | 这是设置背景颜色 |
| app:cardCornerRadius这是 | 设置圆角大小 |
| app:cardElevation | 这是设置z轴的阴影 |
| app:cardMaxElevation | 这是设置z轴的最大高度值 |
| app:cardUseCompatPadding | 是否使用CompatPadding |
| app:cardPreventCornerOverlap | 是否使用PreventCornerOverlap |
| app:contentPadding | 设置内容的padding |
| app:contentPaddingLeft | 设置内容的左padding |
| app:contentPaddingTop | 设置内容的上padding |
| app:contentPaddingRight | 设置内容的右padding |
| app:contentPaddingBottom | 设置内容的底padding |
二: card添加说波纹效果
android:focusable="true"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
添加这3个属性就行了

Untitled4.gif
git 图 感觉看不出什么效果。无奈....