Android Image按钮淡出

时间:2010-11-09 12:27:49

标签: android android-emulator android-widget

如果在'n'秒内没有触摸屏幕,我想实现像MediaController播放/暂停按钮那样的按钮的淡入淡出/浮动。我可以在我的自定义图像按钮上实现这个吗?

1 个答案:

答案 0 :(得分:2)

是,

你可以做到.... 使用计时器,比如20秒....在20秒后使用动画淡化按钮 如果用户在20秒之前触摸屏幕,请再次重置计时器。

非常简单......你必须知道如何使用计时器和动画

这些链接可能有助于你..

http://developer.android.com/reference/android/view/animation/AlphaAnimation.html http://www.hascode.com/2010/09/playing-around-with-the-android-animation-framework/ http://www.barebonescoder.com/2010/06/android-development-more-animations-part-1/

相关问题