elevation 和 translationZ的区别

Z轴阴影: Z = elevation + translationZ

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

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

参考 http://stackoverflow.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.

 

posted @ 2015-12-12 18:04  Leo的银弹  阅读(2854)  评论(0编辑  收藏  举报