A surface is essentially a rectangle of screen space, such as a blank sheet of paper without any view management code or anything like that. You can write graphics to a surface via a
Canvas object; there are other tools to address a surface, but the
Canvas is the most interesting one for us right now because it gives us some good tools for drawing our animation.
We now know a little bit about surfaces, but how do we intend to draw one on the screen? There is a convenient view subclass called
SurfaceView that takes care of the boundary between our raw surface area and any Android views that may be on the screen. In the next example, we will use a
SurfaceView to draw some bubbles, and a game loop to animate it.