elevation 和 translationZ的区别

Z轴阴影: Z = elevation + translationZ

elevation 是静态值,是View在Z轴上的初始值

translationZ是动态值,是Z上的偏移变化

参考 http://*.com/questions/29367804/difference-between-elevation-and-translationz

That is because the actual Z value is the sum of the elevation and the translationZ

In the docs the say elevation is "base z depth of the view" and this is a static variable, while translationZ is dynamic.

So elevation is your start value and for animations you should use translationZ.

上一篇:Android UiAutomator 自动化测试编译运行---新手2


下一篇:详解:Python2中的urllib、urllib2与Python3中的urllib以及第三方模块requests