自定义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(.....);

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章