What is the difference between ViewPropertyAnimator’s translateYBy() vs yBy() methods?

The documentation states that X and Y properties are absolute positions, while translationX and translationY are referred to the LEFT and TOP properties respectively.

So, the difference between animate().x() and animate().translationX() is that one animates to an absolute value, while the other animates to a still absolute value but determined by the view LEFT and TOP values.

By contrast, animate().xBy() and animate().translationXBy() increase (algebraically) the property value by the specified amount.

That is the origin of the “some mathematics” cited above.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)