自定义ViewGroup绘制笔记

1、onMeasure(....)

//循环计算child view measureChild(getChildViewAt(i),x,x);

 h = getChildViewAt(i).getMeasuredHeight();

//计算子view的w h 设置本身

setMeasureDimension (w,h)

2、onLayout() 布局view 位置 child.layout(.....);

猜你喜欢

转载自blog.csdn.net/zdy10326621/article/details/84103255