CardView 造就不一样的样式
2016-12-27 14:13
302 查看
//第一步
添加
buildGradle
//第二步
在布局文件中设置属性
//实现效果
添加
buildGradle
compile 'com.android.support:cardview-v7:24.0.0-alpha2'
//第二步
在布局文件中设置属性
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:id="@+id/activity_card_view" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" app:cardBackgroundColor="#6f0abdd5" app:contentPadding="20dp" app:cardCornerRadius="35dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你好啊"/> </android.support.v7.widget.CardView> <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" app:cardBackgroundColor="#6f0ad50d" app:contentPadding="20dp" app:cardCornerRadius="35dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你好啊"/> </android.support.v7.widget.CardView> </LinearLayout>
//实现效果
相关文章推荐
- Material Design:利用RecyclerView CardView实现新闻卡片样式
- Material Design:利用RecyclerView CardView实现新闻卡片样式
- 利用RecyclerView CardView实现新闻卡片样式
- Android中自定义样式与View的构造函数中的第三个参数defStyle的意义
- RecyclerView+CardView+共享元素+调色板的综合demo
- CardView
- Android中自定义样式与View的构造函数中的第三个参数defStyle的意义
- 解决android studio中导入recyclerview和cardview无效的情况
- 解决v7报中没有CardView的方法
- Android5.0之CardView的使用
- android studio recyclerview基础 自定义列表样式
- iOS 当前视图控制器view.frame 在viewDidLoad 和 viewWillAppear 中值不一样问题
- Android keyboardView字体样式修改
- 依赖CardView 的时候 Studio报错
- 圆形头像CircleImageView和Cardview使用
- Android控件之CardView
- Android CardView卡片布局 标签: 控件
- Material Design最佳体验(2): 使用RecyclerView、CardView、SwipeRefreshLayout实现下拉刷新列表
- Android在一个TextView里显示不同样式的字体
- Android 使用CardView轻松实现卡片式设计