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

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