In android, there are three classes available: Surface, SurfaceView, and SurfaceHolder.
Surface class: each Surface corresponds to a separate video buffer in the system. The Surface is a description of the buffer. You can use the method provided by the Surface class to draw directly on it.
SurfaceView class: used to create and destroy a display area and process the relationship with other views.
SurfaceHolder class: this class is an interface, mainly used to define its corresponding Surface method.
The GUI system uses SurfaceView to operate the Surface, and the application uses SurfaceHolder to operate the Surface. Surface provides the developer with an interface lockCanvas () for obtaining the canvas. This method returns the canvas corresponding to the Surface. The subroutine can be freely used to meet the needs of the application interface.
From Yanyun's column