Forum General

C# problem with ValueAnimator.

AndreyAndrianovAndreyAndrianov RUMember
edited April 2015 in General

Hello,

I try to make timer using valueAnimator. I want that value increases every two seconds, but there is accelerating at the end, it means that at the beginning interval is 2 sec and after a while interval is a few milliseconds. Help me please.

.....
ValueAnimator animator = ValueAnimator.OfInt (1, 1000);
animator.SetDuration (2000);
animator.Start();
......
animator.Update += (object sender, ValueAnimator.AnimatorUpdateEventArgs e) =>
{
int newValue = (int) e.Animation.AnimatedValue;
text.Text = Convert.ToString(newValue);
};
......
P.S. Sorry for my English:)

Tagged:
Sign In or Register to comment.