【问题标题】:Android Image button fadeAndroid 图片按钮淡入淡出
【发布时间】:2011-05-07 05:23:54
【问题描述】:

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

【问题讨论】:

    标签: android android-emulator android-widget


    【解决方案1】:

    是的,

    你可以做到的...... 使用计时器,例如 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/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-31
      • 1970-01-01
      • 2013-05-23
      • 1970-01-01
      • 2021-03-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多