draw()这个函数本身会做很多事情,可参看源码. * 1. Draw the background * 2. If necessary, save the canvas' layers to prepare for fading * 3. Draw view's content * 4. Draw children * 5. If necessary, draw t…
项目:具有圆形效果的自定义View 一.继承View并重写onDraw方法 public class CircleView extends View{ private static final int COLOR = Color.RED; private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private int mWidth = 0; private int mHeight = 0; public CircleView(Contex…