ObjectAnimator中View.Y和View.TRANSLATION_Y的区别

ObjectAnimator animator=ObjectAnimator.ofFloat(textView,View.Y,0,100);

 ObjectAnimator animator=ObjectAnimator.ofFloat(textView,View.TRANSLATION_Y,0,100);    

这两者的区别在于,Y是绝对位置,TRANSLATION_Y是相对位置,跟它定义在布局中的位置有关。

 

猜你喜欢

转载自zhaoxin1943.iteye.com/blog/2099027
y