android - ValueAnimator does not reach maximum value when using reverse mode -
i'm trying animate value 0 100 0. figured valueanimator best. i'm doing this
valueanimato animator = valueanimator.ofint(0, 100); animator.setinterpolator(interpolator); animator.setrepeatmode(valueanimator.reverse); animator.setrepeatcount(valueanimator.infinite); animator.addupdatelistener(listener);
intepolator linearinterpolator , lister logs value. logs see goes 0 range near 100 reverses. reaches 100 few times. question is, shouldn't reach value 100. if not, there way behaviour?
edit trying when target value reached. i've used animation listener now. still keeping question open understand behaviour of animator better.
first thing - animator
framework designed animate ui components. therefore not make sense animate every possible value in range if user's eye won't catch anyway. boundaries of repeating animation not different value within range - if won't see value of 100
on next frame, what's point animator
go trough it?
so, should do? not attach business logic animation listener, since animation repeatable. note, users might disable animations on devices whatsoever (via developer settings).
Comments
Post a Comment