Text color animation

前端 未结 8 1847
南旧
南旧 2020-12-14 10:09

Is there a way to animate a text color change (from anycolor to white)?

The only variant I came up with, is placing two textviews (with the same text) in one place,

8条回答
  •  佛祖请我去吃肉
    2020-12-14 10:40

    The Easiest solution will be to use Object Animators :

    ObjectAnimator colorAnim = ObjectAnimator.ofInt(yourTextView, "textColor",
                Color.RED, Color.GREEN);
                colorAnim.setEvaluator(new ArgbEvaluator());
                colorAnim.start();
    

提交回复
热议问题