Android: automatic animation
I have a Button that needs to be slide in from the bottom automatically after the activity starts for 5 seconds. How do I do that? There shouldn't be any开发者_Go百科 user intervention (Should be done without click).
Thanks
You can do it using Tween animation. http://developer.android.com/guide/topics/resources/animation-resource.html#Tween
set field android:startOffset="5000" in xml with your animation for start delay
You can use a Timer to start the animation, whenever you want.
Check this: http://developer.android.com/reference/java/util/Timer.html
You will have to implement a Runnable that creates and runs or just runs the animation.
精彩评论