Aded AnimatedDrawable class for controlling animations, and modified the example for testing purposes