There is so much to learn about graphics it is difficult to pick out things you need to know. If you want to find out more about how the standard UI works you need to look into the OnDraw event and how to create your own View object that render graphics. You need to find out about Android's vector graphics using shapes and path. You need to know about the different types of animation that are available and eventually you need to learn about OpenGL and its support for hardware accelerated 2D and 3D graphics.
Summary
The subject of Android graphics is huge and there is always more than one way to approach any task. This chapter is a first look at what you might call UI-based graphics.
The Bitmap is the basic graphics object. It consists of a rectangle of pixels that can be set to any color.
The ImageView is a general purpose UI component that can be used to display a range of graphics objects including a Bitmap.
You can draw on a Bitmap using a Canvas object which has a large number of different drawing methods.
The color and drawing style used by many of the Canvas methods is determined by the properties of a Paint object.
The Canvas object also supports transformations which can be use to modify where a graphic is drawn, its size, rotation etc.
Transformations can be used to standardize the drawing of graphics objects at the origin.
Transformations can also be used to change the default pixel coordinate system to anything you want to use.
Simple animation is possible using nothing but a Bitmap, Canvas and an ImageView
Only the UI thread can modify the UI.
The Android Timer can be used to animate 2D graphics but you have ensure that its runs the code on the UI thread using the RunOnUIThread method.
You can download the code for the animation program from the CodeBin. (Note you have to register first).
Android Programming In Java: Starting With an App Third Edition