We've seen that Android provides a wealth of features for creating animations by interchanging and manipulating images. But what if we want direct control of the code that performs the animation?
By combining an Android display element called a surface, with a technique from computer game programming called a game loop, we can programmatically create animations in an efficient way. This is useful for creating fast animated widgets with a unique style.
In this chapter, we shall do the following:
So let's get on with it.
Game loops are single-threaded ...