CardView教程
版本:2018/4/24-1
转载请注明链接:https://blog.youkuaiyun.com/feather_wch/article/details/80069108
1、背景介绍
1. CardView和RecyclerView一样是Android5.0以后新出现的控件,伴随着Material Design设计而诞生。
2、使用实例
- 导入
compile 'com.android.support:cardview-v7:26.1.0'CardView包裹住需要添加卡片效果的布局即可。
<android.support.v7.widget.CardView
android:id="@+id/stars_rv_profile_item_cardview"
android:layout_width="match_parent"
android:layout_height="match_parent"

本文介绍了Android 5.0以上新增的CardView控件,作为Material Design的一部分,它常用于展示卡片式UI。文中提供了CardView的使用实例,包括导入步骤和如何包裹内容,并详细解析了CardView的属性,特别指出android:background设置背景颜色无效。此外,还讨论了为CardView添加点击的波纹特效。
最低0.47元/天 解锁文章
347

被折叠的 条评论
为什么被折叠?



