Android provides several ways to implement Animations. But for different situation, we have to choose different approach. For example, if we want to create a menu dropdown animation or view slider effect, we can choose Android tweened animation. It is the basic Android animation engine which animated the view’s position, size, rotation. In this article Android View Animation Example, I have talked about this. Here is another case, if we want to create a loading icon animation or a character with regular animation, Android frame by frame animation mechanism is the best choice. You can find more information in this article Android Frame Animation Example in Flappy Bird.
However, all animation mechanisms mentioned above are still not enough to cover all scenarios. For example, how can I control the frame rate in frame by frame animation? We can start or stop the frame by frame animation, but how to pause the animation. To solve these problem, I suggest we can use sprite sheet animation. In Android, we can create a sprite sheet animations by drawing frames on Canvas within SurfaceView. In this tutorial, I will show you how to draw images on Canvas within Thread frame by frame. The frame rate is controlled by thread sleeping.