Android ==> Simple Animation?
How can i display a simple animation?
Let's say there is a button on the screen with margin left of 200, and margin top o开发者_如何学Pythonf 200. I need to set the margin left, and top of this button to 0 and show a simple animation.
So basically a simple animation on a button from position 200,200 to position 0,0
There are mainly 4 built-in Animations comes up with Android SDK:
- AlphaAnimation – transparency changes
- RotateAnimation – rotations
- ScaleAnimation – growing or shrinking
- TranslateAnimation – position changes
So from these....You can implement TranslateAnimation
.
You can refer Example here and also Android SDK - TranslateAnimation .
Enjoy!!!
Use a TranslateAnimation
.
精彩评论