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.

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM