Material Design 设计--阴影的重要性

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView android:layout_width="100dp"
android:layout_margin="2dp"
android:layout_height="100dp"
android:text="test"
android:background="@android:color/white"
android:gravity="center"
android:elevation="1dip"
/>
<TextView android:layout_width="100dp"
android:layout_margin="2dp"
android:layout_height="100dp"
android:text="test"
android:background="@android:color/white"
android:gravity="center"
android:elevation="4dip"/>
<TextView android:layout_width="100dp"
android:layout_margin="2dp"
android:layout_height="100dp"
android:text="test"
android:background="@android:color/white"
android:gravity="center"
android:elevation="8dip"
/>
</LinearLayout>
总结
View的z值由两部分组成,elevation和translationZ.
eleavation是静态的成员,translationZ是用来做动画。
Z = elevation + translationZ
在布局中使用 android:elevation属性去定义
在代码中使用 View.setElevation 方法去定义
设置视图的translation,可以使用View.setTranslationZ方法
新的ViewPropertyAnimator.z和ViewPropertyAnimator.translationZ方法可以设置视图的elevation值
Material Design 设计--阴影的重要性的更多相关文章
- 仿知乎app登录界面(Material Design设计框架拿来就用的TexnInputLayout)
在我脑子里还没有Material Design这种概念,就我个人而言,PC端应用扁平化设计必须成为首选,手当其冲的两款即时通讯旺旺和QQ早就完成UI扁平化的更新,然而客户端扁平化的设计本身就存在天生的 ...
- Android Material Design-Creating Apps with Material Design(用 Material Design设计App)-(零)
转载请注明出处:http://blog.csdn.net/bbld_/article/details/40400031 翻译自:http://developer.android.com/trainin ...
- Angular Material design设计
官网: https://material.io/design/ https://meterial.io/components 优秀的Meterial design站点: http://material ...
- material design——设计文档
http://www.uisdc.com/comprehensive-material-design-note
- Material Design设计的开源代码
https://github.com/telly/FloatingAction http://www.csdn.net/article/2014-11-21/2822753-material-desi ...
- 【Material Design视觉设计语言】应用样式设计
作者:郭孝星 微博:郭孝星的新浪微博 邮箱:allenwells@163.com 博客:http://blog.csdn.net/allenwells Github:https://github.co ...
- 【Material Design视觉设计语言】应用布局设计
[Material Design视觉设计语言]章节列表 [Material Design视觉设计语言]开篇 [Material Design视觉设计语言]Material Design设计概述 [Ma ...
- Material Design(原质化设计)视觉设计语言规范 踏得网镜像
Android 5.0 Lollipop(棒棒糖,也就是之前的代称Android L)全面实践了谷歌最新研发的 Material Design 设计语言规范,只是该设计规范并不是仅针对移动平台. 我们 ...
- Material Design Lite,简洁惊艳的前端工具箱。
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,博客地址为http://www.cnblogs.com/jasonnode/ .网站上有对应每一 ...
随机推荐
- c++ linux 下的调试工具及用法
1当程序出现core的时候: gdb out[your program] core.out.45726.1431954543 可以看到程序崩溃时候的堆栈信息. valgrind ./out 由于val ...
- Codeforces Round #347 (Div. 2) C. International Olympiad 找规律
题目链接: http://codeforces.com/contest/664/problem/C 题解: 这题最关键的规律在于一位的有1989-1998(9-8),两位的有1999-2098(99- ...
- Asp.Net原理Version1.0
Asp.Net原理Version2.0 Asp.Net原理Version3.0_页面声明周期
- [转载]C#中的WebBrowser控件的使用
http://www.cnblogs.com/txw1958/archive/2012/09/24/CSharp-WebBrowser.html
- PE工具
PE编辑工具 Stud_PE v. 2.4.0.1 PE工具,用来学习PE格式十分方便. http://www.cgsoftlabs.ro/ 汉化版:http://bbs.pediy.com/show ...
- Unity3D开发(五):Unity3D 4.x 使用Mecanim实现连击(转)
原地址:http://www.unitymanual.com/blog-1801-1221.html unity3d 4.x 版本之后提供了一种新的动画机制Mecanim,虽然目前还支持之前的Anim ...
- javascript 比较
javascript中由于是弱类型,所以在比较的时候有较大的麻烦.这次专门做了总结: Comparison Operators Comparison operators are used in log ...
- JavaC 编译目录下所有的UTF-8编码的java文件
javac -encoding UTF-8 *.java
- Android 近百个项目的源代码
Android 近百个项目的源代码 Android PDF 阅读器 http://sourceforge.net/projects/andpdf/files/个人记账工具 OnMyMeans http ...
- mysql 多表 update sql语句总结
mysql 多表 update 有几种不同的写法. 假定我们有两张表,一张表为Product表存放产品信息,其中有产品价格列Price:另外一张表是ProductPrice表,我们要将ProductP ...