android 5.0新特性学习--CardView
CardView继承自FrameLayout类,可以在一个卡片布局中一致性的显示内容,卡片可以包含圆角和阴影。CardView是一个Layout,可以布局其他View.
官网地址:https://developer.android.com/reference/android/support/v7/widget/CardView.html
继承关系:
| java.lang.Object | ||||
| ↳ | android.view.View | |||
| ↳ | android.view.ViewGroup | |||
| ↳ | android.widget.FrameLayout | |||
| ↳ | android.support.v7.widget.CardView | |||
CardView的属性:
elevation --CardView的Z轴阴影(也就是阴影的高度)“android:elevation = "100dp";
cardBackgroundColor--CardView的卡片颜色(cardView背景颜色);
cardConerRadius -- CardView卡片的四角圆角矩形程度(cardview圆角半径);
下面xml文件中即表示这个card控件为:矩形程度为8dp,背景颜色为黑色的卡片。
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/cardview"
app:cardCornerRadius="8dp"
app:cardBackgroundColor="@color/black"
android:layout_margin="8dp"
android:layout_height="80dp"
android:layout_width="match_parent"> <TextView
android:text="TextView in CardView"
android:layout_gravity="center"
android:textSize="26sp"
android:textColor="@color/l_white"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
android 5.0新特性学习--CardView的更多相关文章
- android 5.0新特性学习--视图阴影
android 5.0的视图阴影主要是体验出层次性,就是在一个物体上面叠加上一层的设计,而这种设计就是除了传统的,x,y的纸面层,还有就是透过纸面的z轴的层次设计. elevation: 高度,静态属 ...
- android 5.0新特性学习总结之下拉刷新(一)
android 5.0 后google最终在 support v4 包下 添加了下拉刷新的控件 项目地址: https://github.com/stormzhang/SwipeRefreshLayo ...
- android 5.0新特性学习--RecyclerView
在过去很多年,我们的PC或者手机设备都是采用拟物化的设计风格,IOS采用扁平化的特性,android在2014年IO大会上说采用Material Design的设计风格,显示效果不能过于生硬的转换,而 ...
- android 5.0新特性学习--Drawable Tinting(为图片资源着色)
使用android:tint属性去调整色调.android:tintMode 着色模式 screen multiply and src_atop/src_in/src_oversetTint(int ...
- android 5.0新特性学习--视图轮廓
ViewOutlineProvider -- 视图轮廓setOutlineProvider--可以使用View.setClipToOutline方法去剪切一个视图的outline区域.只有rectan ...
- Android 6.0 新特性 整理 资料来自网络
Android 6.0新特性 Runtime Permissions Doze and App Standby Apache HTTP Client Removal BoringSSL Access ...
- Android 8.0 新特性
Android 8.0 (Android Oreo(奥利奥))新特性介绍 通知渠道 - Notification Channels 通知渠道是由应用自行定义的通知内容类别,借助渠道,开发者可以让用户对 ...
- android 7.0 新特性 和对开发者的影响
android 7.0新特性 - jiabailong的专栏 - 博客频道 - CSDN.NEThttp://blog.csdn.net/jiabailong/article/details/5241 ...
- 腾讯云安全:开发者必看|Android 8.0 新特性及开发指南
欢迎大家关注腾讯云技术社区-博客园官方主页,我们将持续在博客园为大家推荐技术精品文章哦~ 背景介绍 谷歌2017 I/O开发者大会今年将于5月17-19日在美国加州举办.大会将跟往年一样发布最新的 A ...
随机推荐
- 文字编码转换器 V1.0 免费绿色版
软件名称: 文字编码转换器 软件语言: 简体中文 授权方式: 免费软件 运行环境: Win7 / Vista / WinXP 软件大小: 920KB 图片预览: 软件简介: 文字编码转换器,能把普通文 ...
- 将数组写入plist文件
data 加载plist [NSBundle mainBundle] [arr writeToURL:<#(NSURL *)#> atomically:<#(BOOL)#>]
- .net 2.0 后台多线程
System.Threading.Thread thread1 = new System.Threading.Thread(delegate() { Web.BLL.banpaiconfig.Vide ...
- C++设计模式-参考资料
设计模式实例讲解: http://www.cnblogs.com/jiese/tag/ http://www.cnblogs.com/wanggary/category/294620.html 设计模 ...
- 在textarea的内容后面增加内容
document.getElementById("result").value+=data+"\n>"; 本文为本人用来记录自己做的一些东西,如有不对的地 ...
- java 邮件
使用java语言实现邮件的简单的发送和接受. 说明:使用Java应用程序发送E-mail比较简单,在使用下列程序之前,你需要将mail.jar和activation.jar 添加到你的CLASSP ...
- 使用httperrequest,模拟发送及接收Json请求
使用httpreques\Json-Handle\tcpdump\wireshark工具进行,抓取手机访问网络的包,分析request及response请求,通过httprequester来实现模拟发 ...
- WHM使用手册by lin
WebHost Manager 11使用手册(WHM使用手册) 本手册翻译自cpanel官方文档. 本翻译中文版本版权归美国主机侦探所有,未经允许,禁止复制. Overview(概述) 本用户手册主要 ...
- jQuery的dataTables插件实现中文排序
最近在写Java web. 写JSP的时候发现一个很好玩的插件dataTables.分页.过滤.排序等等手到擒来. 哎哎哎,有点点可惜的是排序这个功能不支持中文.于是网上查查找找,现在把方法整理一下, ...
- js第一天 inner html value
<html> <head> <meta charset="utf-8" /> <title></title> <s ...