ObjectAnimator.setDuration is ignored

Mike Baxter

The setDuration function of the ObjectAnimator class in Android appears to be completely ignored. No matter what value I pass it, the animation is always completed instantly.

    ObjectAnimator.ofFloat(mView, "translationY", 0, 100)
            .setDuration(2000)
            .start();

The above code increases the Y value of mView by 100 (essentially pushing it further down the screen). The actual translation occurs correctly, however it is instantaneous. The setDuration(2000) is completely ignored. Why is this?

EDIT:

This seemsto be based on the device - the samsung galaxy s4 appears to have an issue with interpolating views correctly. This is the same issue as this question.

Mike Baxter

This turned out to be an issue with the default animation duration scale under Developer Options. I've answered a similar question here.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Android- setDuration not Working? ObjectAnimator

From Dev

nineoldandroids - setDuration doesnt work on AnimatorSet

From Dev

playTogether(Animator...) is not applicable for the arguments (ObjectAnimator, ObjectAnimator)

From Dev

How to not cancel the animate().alpha(1).setDuration(100)

From Dev

List of ObjectAnimator animation properties

From Dev

ObjectAnimator on Drawable object

From Dev

Android ObjectAnimator vs ViewPropertyAnimator

From Dev

ObjectAnimator vs TranslateAnimation

From Dev

Setting up an AnimationListener for an ObjectAnimator

From Dev

ObjectAnimator with Infinite rotation stutters

From Dev

ObjectAnimator on Drawable object

From Dev

Android ObjectAnimator Start offset

From Dev

ObjectAnimator duration not respected

From Dev

ObjectAnimator on Path not working on Marshmallow?

From Dev

objectanimator with custom view

From Dev

ObjectAnimator on ProgressWheel by Todd-Davies

From Dev

Change multiple properties with single ObjectAnimator?

From Dev

Fade out and translate VectorDrawable with ObjectAnimator

From Dev

Add Listener to ObjectAnimator using Lambda

From Dev

setDuration only affects one CALayer when animating multiple CALayers

From Dev

If not being ignored

From Dev

objectAnimator shows white background for fragments in Android

From Dev

How to create ObjectAnimator with valueType - pathType programmatically?

From Dev

Android View position not updating after ObjectAnimator tranlation

From Dev

ObjectAnimator with scale property makes bg black?

From Dev

Android Studio XML does not recognize objectAnimator

From Dev

Can't get objectAnimator working with xFraction

From Dev

Animating TextView's leftDrawable using ObjectAnimator

From Dev

ImageView ObjectAnimator transition + collision detection during transition

Related Related

  1. 1

    Android- setDuration not Working? ObjectAnimator

  2. 2

    nineoldandroids - setDuration doesnt work on AnimatorSet

  3. 3

    playTogether(Animator...) is not applicable for the arguments (ObjectAnimator, ObjectAnimator)

  4. 4

    How to not cancel the animate().alpha(1).setDuration(100)

  5. 5

    List of ObjectAnimator animation properties

  6. 6

    ObjectAnimator on Drawable object

  7. 7

    Android ObjectAnimator vs ViewPropertyAnimator

  8. 8

    ObjectAnimator vs TranslateAnimation

  9. 9

    Setting up an AnimationListener for an ObjectAnimator

  10. 10

    ObjectAnimator with Infinite rotation stutters

  11. 11

    ObjectAnimator on Drawable object

  12. 12

    Android ObjectAnimator Start offset

  13. 13

    ObjectAnimator duration not respected

  14. 14

    ObjectAnimator on Path not working on Marshmallow?

  15. 15

    objectanimator with custom view

  16. 16

    ObjectAnimator on ProgressWheel by Todd-Davies

  17. 17

    Change multiple properties with single ObjectAnimator?

  18. 18

    Fade out and translate VectorDrawable with ObjectAnimator

  19. 19

    Add Listener to ObjectAnimator using Lambda

  20. 20

    setDuration only affects one CALayer when animating multiple CALayers

  21. 21

    If not being ignored

  22. 22

    objectAnimator shows white background for fragments in Android

  23. 23

    How to create ObjectAnimator with valueType - pathType programmatically?

  24. 24

    Android View position not updating after ObjectAnimator tranlation

  25. 25

    ObjectAnimator with scale property makes bg black?

  26. 26

    Android Studio XML does not recognize objectAnimator

  27. 27

    Can't get objectAnimator working with xFraction

  28. 28

    Animating TextView's leftDrawable using ObjectAnimator

  29. 29

    ImageView ObjectAnimator transition + collision detection during transition

HotTag

Archive