开发者

Android: Fade text in and out within Widget

How can I use a fade i开发者_运维问答n and fade out effect while changing text in a widget? I have the text switching instantly but I would like to fade the text out change it and then fade it back in again. I have tried using loadAnimation, but widgets don't seem to like that.

Any help on how I can get this working will be really appreciated.

Thank you :)


You can animate a property of the TextView with property animation. In your case you'd animate the alpha property.

Since you ned to fade out, change text and then fade in, you'll need two animations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜