问题描述
我想提出一个图片库的应用程序。我目前有在底部的文本视图ImageView的。目前,它仅仅是半透明的。我想让它淡入,等待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),以prevent瞬间淡出,为您淡入设置animationListener效果和启动额外的动画对象上的淡入的animationEnd,然后你开始淡出对额外的动画对象的动画结束,请尝试下面的链接,它会帮助..
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的动画 - 淡入,等待,淡出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!