[Points]Canvas and Drawables
origin article: http://developer.android.com/guide/topics/graphics/2d-graphics.html
translation: http://www.cnblogs.com/jsaint/articles/3427728.html
Draw style
- bind layout view
- canvans draw
On the View
- do draw in View onDraw() function
- invalidate() request system call onDraw
- postInvalidate() not in Ui thread
On a SurfaceView
- async draw
Drawables
creaet function
- saved as res images
- create in xml(AnimationDrawable and so on)
- new using constructors
- notice image res may be automatically compression if you do not want put in res/raw/
create form resource images
- using resouce id (both in code and xml)
drawables
- ShapeDrawable(basic shape)
- NinePatchDrawable(can be stretch)