I am trying to animate a Paint
object in my custom view between colors. But the animation is not working.
ObjectAnimator colorFade = ObjectAnimator.ofObject(mCirclePaint, "color", new ArgbEvaluator(), getColor(), 0xff000000);
colorFade.setDuration(1500);
colorFade.start();
invalidate();
I have previously set the paints color like this:
mCirclePaint.setColor(Color.RED);
UPDATE I don't think the Handler
makes a difference to whether it animated or not. Even without the Handler I cannot animate the paint object.
This is the solution I found:
try this: