Want to get started with animations on Android? It turns out, things are surprisingly easy.
There are two ways to create animations:
- Using OpenGL --- See documentation here
- Using built-in View animations --- More here and here.
I explored the later. Basically the code boils down to the following:
1- Create an animation
template. For example the following can be used to rotate an imageview back and forth:
2- You can then apply the animation to the view using the following code:
I created the following
app to demonstrate various animations on arbitrary images: