TextView 动画 - 淡入、等待、淡出 [英] TextView animation - fade in, wait, fade out

查看:22
本文介绍了TextView 动画 - 淡入、等待、淡出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个图片库应用程序.我目前有一个底部带有文本视图的图像视图.目前它只是半透明的.我想让它淡入,等待 3 秒,然后淡出 90%.将焦点放在它上面或加载新图片将使其重复循环.我已经阅读了十几页并尝试了一些事情,但没有成功.我得到的只是淡入和即时淡出

I am making a picture gallery app. I current have a imageview with a text view at the bottom. Currently it is just semitransparent. I want to make it fade in, wait 3 second, then fade out 90%. Bringing focus to it or loading a new pic will make it repeat the cycle. I have read thru a dozen pages and have tried a few things, no success. All I get is a fade in and instant fade out

推荐答案

您可以使用额外的动画对象(不修改其 alpha)来防止即时淡出,为您的淡入效果设置 animationListener 并启动在淡入的动画结束时额外的动画对象,然后在额外的动画对象的动画结束时开始淡出,试试下面的链接,它会有所帮助..

You can use an extra animation object (which doesn't modify its alpha) to prevent the instant fade out, set animationListener for your fade-in effect and start the extra animation object in the on animationEnd of the fade-in, then you start fade-out on animation end of the extra animation object, try the link below, it'll help..

文本视图的自动淡入淡出效果

这篇关于TextView 动画 - 淡入、等待、淡出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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