ObjectAnimator和ViewPropertyAnimator改变属性值有什么区别?
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(myObject, "X", 0.0f, 100.0f);
Run Code Online (Sandbox Code Playgroud)
我正在尝试myObject.getX()上面objectAnimator正在进行中,并且我在0.0f到100.0之间获得了一个在路上的值.
myObject.setX(0.0f);
myObject.animate().x(100.0f);
Run Code Online (Sandbox Code Playgroud)
但是,我得到了精确的100.0当我myObject.getX()倒是而上述ViewPropertyAnimator工作正在进行中.
我无法弄清楚是什么造成了这种差异.
提前致谢.