Recommend Reading: Draw Animation on Canvas Example
Android provide a full functions on Graphics. Commonly, we can use 2D graphics library and OpenGL ES 1.0 for 3D graphic. In this post, I gonna to introduce the 2D graphics, and give you a 2D graphics canvas example. Usually, when we try to draw 2D graphics, as android developer page say, we have two ways to choose:
- Draw your graphics or animations into a View object from your layout.
- Draw your graphics directly to a Canvas.
Draw graphics directly to a Canvas is a little bit complicated. You can go to the android developer page for farther details. The following example will show you how to draw a bitmap on the canvas, when you click the canvas.
