Having a custom surface view as part of your Android application is very useful. It allows you to extend the functionality of the system by providing additional control over how views are displayed on screen. You can provide extra touch handling, visual effects or animation using an OnTouchListener and even add your own gestures!
The SurfaceView is a View object that wraps around an Android Surface for drawing. It has the ability to dynamically change its size and format according to your needs!
So if you’re looking for a way to draw something in an app like toolset in a photo painter, the SurfaceView is one of your best bets. It wraps up all that drawing goodness and lets you specify its size on-the-fly through dynamic sizing methods.
The SurfaceView in Android is a way to draw independently of the UI thread for resource-intensive operations. However, it does use more memory, but not as much as you might think because its primary function is drawing on an offscreen canvas and displaying the results using OpenGL ES graphics (which are already fast).