Android Image button fade
I wants to implem开发者_C百科ent fading/floating of buttons like that of MediaController play/pause buttons if screen is not touched for 'n' sec. Is it possible for me to implement this on my custom image button?
Yes,
You can do it.... Use a timer, say for 20 seconds.... after 20 secs use the animation to fade the buttons and if the user touches the screen before 20 secs, reset the timer again.
Its very simply... u have to know how to use the timer and animation
these links may help u..
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/
精彩评论