Drawing shapes with fingers
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhslB0yAVOaYYZ9VHbf77h8k2hXNDJ5WyJu4e1-FqM0o1jY9jFzFlCHQHN4zhOiRe-qjbBz4vLiQH9e4hfZKUpl83q2k6tI1w1vAV3vD9AufgvrT0H1Uz4ANIJPotXvG-zz1Iyqu01tGDMM/s640/Screenshot_2014-01-17-23-18-21.png)
It is very simple to draw basic shapes with fingers. As always, it is just an example, you can improve it in many ways. First of all we need a custom View . public class DrawingView extends View { } Then we will use a Bitmap, a Canvas and a Paint ojbects: protected Paint mPaint; protected Bitmap mBitmap; protected Canvas mCanvas; To initialize the bitmap and the canvas, we can override this method in our View: @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); mBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); mCanvas = new Canvas(mBitmap); } If you need to create a new Canvas, you must define the Bitmap upon which drawing will actually be performed. The Bitmap is always required for a Canvas. Then we can define the paint object. The Paint holds the information about the style and the color which we will use to draw. For example: public