android中cardview的基本使用
来源:互联网 发布:腾讯电脑管家 游戏优化 编辑:程序博客网 时间:2024/05/18 13:06
cardView的基本使用 留个demo 做个小小的备份
cardView个人感觉类似于xml布局 shape的效果
首先在项目的build.gradle中添加引用
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:cardview-v7:23.1.1'}
xml布局文件
<android.support.v7.widget.CardView xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="20dp" app:cardBackgroundColor="#303069" app:cardCornerRadius="8dp" >主要属性
app:cardElevation
阴影的大小app:cardMaxElevation
阴影最大高度app:cardBackgroundColor
卡片的背景色app:cardCornerRadius
卡片的圆角大小app:contentPadding
卡片内容于边距的间隔
重要一点cardView继承Framelayout
0 0
- android中cardview的基本使用
- Android CardView的基本使用
- Android中CardView的使用
- Android中CardView的使用
- Android组件之CardView的基本使用
- CardView的基本使用
- Android中CardView使用
- Android中CardView的简单使用
- Android CardView的使用
- Android CardView 的使用
- Android CardView的使用
- Android CardView 的使用
- RecyclerView CardView的基本使用
- android之CardView的使用
- Android RecyclerView + CardView的使用
- android--UI--CardView的使用
- Android的CardView使用总结
- Android CardView的使用细节
- laravel环境搭建
- swift学习日志—— Log日志
- Nginx和Nginx+的比较(下)
- flex 显示二进制图片
- Java线程(篇外篇):阻塞队列BlockingQueue
- android中cardview的基本使用
- thinkphp 自定义分页类 跳页功能
- POJ 3565 Ants
- 关于x264的一篇论文:讲解很详细
- 使用JS加载GoogleMap
- 怎么写redmine wiki
- document.compatMode属性
- ubuntu下umeng多渠道打包工具及shell脚本批量执行
- matplotlib windows下安装