There are two ways to create animations:
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:
I created the following app to demonstrate various animations on arbitrary images:
Read the README.md for more details.