仅献给刚学自定义VIEW 的小白们,大佬勿喷~
1-控件大小发生变化调用如下方法
`protected void onSizeChanged(int w, int h, int oldw, int oldh) {}`
2-view的绘制
protected void onDraw(Canvas canvas) {
}
3-view的测量
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {}
具体说明我已经在代码中加入详细注释,因为写的代码是很长时间之前的,有的注释可能不是很准确,但是98%还是准确的,要看代码的同学们 一定要谨慎
=