ObjectAnimator.setDuration is ignored
The setDuration function of a class ObjectAnimator
in Android seems to be completely ignored. No matter what value I pass, the animation is always instant.
ObjectAnimator.ofFloat(mView, "translationY", 0, 100)
.setDuration(2000)
.start();
The above code increases the Y value mView
by 100 (essentially pushes it further down the screen). The actual translation is correct, but instant. setDuration(2000)
completely ignored. Why is this?
EDIT:
It looks like a device - samsung galaxy s4 seems to have a problem with interpolating representations correctly. This is the same problem as this question .
+3
source to share