开发者

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:

  1. AlphaAnimation – transparency changes
  2. RotateAnimation – rotations
  3. ScaleAnimation – growing or shrinking
  4. TranslateAnimation – position changes

So from these....You can implement TranslateAnimation.

You can refer Example here and also Android SDK - TranslateAnimation .

Enjoy!!!


Use a TranslateAnimation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜