Summary of Custom Views Part Ii

自定义View总结 - 布局 布局基础 布局过程,就是程序在运行时利用布局文件中的代码来计算出实际尺寸和位置的过程。有两个阶段,测量阶段和布局阶段,

Summary of Custom Views Part I

自定义View总结 - 绘制 绘制基础 Canvas.drawColor(@ColorInt int color) 颜色填充 drawCircle(float centerX, float centerY, float radius, Paint paint) 画圆 Paint.setColor(int color),Paint.setStyle(Paint.Style style),Paint.setStrokeWidth(float width),Paint.setAntiAlias(boolean aa) drawRect(float left, float top, float right, float bottom, Paint paint) 画矩形 drawPoint(float x, float y, Paint paint) 画点 drawPoints(float[] pts, int offset, int count, Paint paint) / drawPoints(float[] pts,