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.
Share
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/