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 ...
随机推荐
- 缓存HA的开源解决方案
1) Twitter的Redis/Memcached代理服务:Twemproxy 2) Facebook的Memcached协议路由器:McRouter 3) Youtube的Mysql中间件:Vit ...
- 【Machine Learning in Action --4】朴素贝叶斯过滤网站的恶意留言
背景:以在线社区的留言板为例,为了不影响社区的发展,我们需要屏蔽侮辱性的言论,所以要构建一个快速过滤器,如果某条留言使用了负面或者侮辱性的语言,那么就将该留言标识为内容不当.过滤这类内容是一个很常见的 ...
- Win7的64位系统如何搭建安卓Android开发环境
在搭建安卓Android开发环境,那么现在比较主流的Win7的64位操作系统如何搭建呢?其实很简单,不需要设置任何环境变量,只需要下载两个程序包(ADT和JDK),下载的时候注意选择相应的64位程序包 ...
- 比较全的 C# 操作 Word的代码
using System;using System.Collections.Generic;using System.Text;using Microsoft.Office.Interop.Word; ...
- Eclipse没有提示了,按Alt+/ 也无代码提示
1.菜单window->Preferences->Java->Editor->Content Assist->Enable auto activation 选项要打上勾 ...
- python 日历
上章总结了python中time模块的使用,这次总结日历模块 calendar >>> import calendar >>> cal = calendar.mon ...
- pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法
转自:http://blog.csdn.net/tingyuanss/article/details/43763899 用pgadmin3 新建服务器出现错误 Peer authentication ...
- java代理的深入浅出(一)-Proxy
java代理的深入浅出(一)-Proxy 1.什么是代理 代理模式是常用的java设计模式,他的特征是代理类与委托类有同样的接口,代理类主要负责为委托类预处理消息.过滤消息.把消息转发给委托类,以及事 ...
- Chapter 1 Mr.Sherlock Holmes
I took my degree of Doctor of Medicine in the University of London, and proceeded to Netley to go th ...
- LeetCode OJ 222. Count Complete Tree Nodes
Total Accepted: 32628 Total Submissions: 129569 Difficulty: Medium Given a complete binary tree, cou ...