Draw primitive shapes such as rectangle, circle etc in ANDROID, A simple example. By admin | February 12, 2011 1 Comment The following example shows how to draw a rectangle using the Paint Class in ANDROID. Just copy and paste the following code to your file and you are done.