blipinsk / ViewPropertyObjectAnimator

Wrapper of the ObjectAnimator that can be used similarly to ViewPropertyAnimator
Apache License 2.0
348 stars 29 forks source link

ViewPropertyObjectAnimator widthPercent and duration #11

Closed matthewrice345 closed 7 years ago

matthewrice345 commented 7 years ago

When animating a percent change for a PercentRelativeLayout the setDuration is ignored causing the animation to execute immediately. Even when added to a AnimatorSet with a duration the animation still executes immediately.

    val detailAnim = ViewPropertyObjectAnimator.animate(detail)
            .widthPercent(100F)
            .setDuration(3000).start()
matthewrice345 commented 7 years ago

Looks like I solved my problem. The percent values are from 1.0F to 0.0F and since I had 100F it animated very quickly.