【问题标题】:Background color change (every second a slight change) [closed]背景颜色变化(每秒轻微变化)[关闭]
【发布时间】:2015-04-28 08:02:02
【问题描述】:

谁能告诉我如何实现每秒略有变化的背景,如the picture所示。

【问题讨论】:

  • 这是任何方法执行时的处理条或进度。我是正确的。
  • 你需要通过创建自定义对话框来做到这一点,然后你就可以做到
  • @amitsharma 可以用请告诉我具体的实现方式
  • 这显示在您的图片或图像中,这是您的问题,因此您需要详细说明他的问题
  • 没有哥们坐在这里给你解决你的要求做一些他自己然后如果你需要得到小帮助然后有人可以帮助你......

标签: android performance android-layout android-activity


【解决方案1】:

这可能对你有帮助

ValueAnimator colorAnim = ObjectAnimator.ofInt(**myView**, "backgroundColor", Color.RED, Color.BLUE);

            colorAnim.setDuration(3000);
            colorAnim.setEvaluator(new ArgbEvaluator());
            colorAnim.setRepeatCount(ValueAnimator.INFINITE);
            colorAnim.setRepeatMode(ValueAnimator.REVERSE);
            colorAnim.start();

myView 是你想要应用动画的视图

【讨论】:

猜你喜欢
  • 2012-07-03
  • 1970-01-01
  • 1970-01-01
  • 2017-04-14
  • 2021-10-02
  • 2014-09-14
  • 2021-02-13
  • 2017-12-10
  • 2021-11-10
相关资源
最近更新 更多