用动画的TextView的颜色变化(卡拉OK) [英] Change color of textview using Animation (Karaoke)

查看:208
本文介绍了用动画的TextView的颜色变化(卡拉OK)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的应用程序来模拟一个卡拉OK。

I need to simulate a karaoke in my application.

我也希望用户更改着色每个单词(制作卡拉OK \\较慢更快)的期限。

I also want the user to change the duration of coloring each word (Making the karaoke slower \ faster).

我读过这个解决方案:
<一href=\"http://stackoverflow.com/questions/8388341/solved-how-to-make-dynamic-change-of-textview-and-ui-in-general\">SOLVED - 如何使TextView的UI和一般的动态变化

I've read this solution: SOLVED - How to make Dynamic change of TextVIew and UI in general?

可以此解决方案通过动画,这是$ P $在API 4.0 psented被取代?如何能做到?

Can this solution be replaced by Animation that was presented in API 4.0 ? How can it be done ?

推荐答案

我从来没有做过,所以我没有任何code真的对你。

I have never done it so I don't have any code for you really.

但我认为你可以使用3 ofInt ValueAnimator对象从0-255去重新present RGB值。

But I think you could use 3 ofInt ValueAnimator object to go from 0-255 to represent rgb values.

然后在每一个步骤,你可以在RGB值传递给 Col​​or.rgb(R,G,B); 的,这个结果传递给 TextView.setTextColor(INT颜色);

Then at each step you could pass in the rgb values to Color.rgb(r,g,b); And pass the result of that to TextView.setTextColor(int color);

这篇关于用动画的TextView的颜色变化(卡拉OK)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆