user1205415
user1205415

Reputation: 605

Animation over the layout?

when I start my app, you see the layout (color.black) and a button. Now under the button I have a view (30dp x 30dp) with image as a background. And this view should moving from left to right. That's it. I searched the and found, that there is e.g. Transition Drawable. But I don't know, is that the best solution for that? I mean, I only want a small background animation. I don't want that, when i click the button, the app is then a little bit freezing.

Upvotes: 1

Views: 818

Answers (2)

vicky
vicky

Reputation: 340

If your apk version is less than 3.0 use the library in this link http://nineoldandroids.com/, else use object animator

Upvotes: 2

Lucas Arrefelt
Lucas Arrefelt

Reputation: 3929

You should use view animation for simple animations. It is easy to setup and you can configure it for your needs.

View animation: http://developer.android.com/guide/topics/graphics/view-animation.html

Example tutorial (rotation, but linear movement is just as simple): http://www.edumobile.org/android/android-programming-tutorials/rotating-text-animation/

Upvotes: 1

Related Questions