Drawing customized shapes and basic shapes in Android
By extending the View Class, we can draw lot of shapes like circle, triangle, rectangle, rounded rectangle, bitmap, gradientdrawable, customized shape etc. Here I am explaining a few things about that.
Drawing circle, rectangle are straight forward, triangle we can draw using three lines. For customized shapes, we can use "Path" class in Android.
Path path = new Path();
path.addArc(new RectF(140, 180, 180, 220), -180, 180);
This path, we will draw in canvas using,