示例#1
0
 private void layoutChildren() {
   final int childCount = getChildCount();
   for (int i = 0; i < childCount; i++) {
     final View child = getChildAt(i);
     layoutChild(child);
   }
 }
示例#2
0
 private void measureAndLayoutChild(View v) {
   int childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(getWidth(), MeasureSpec.EXACTLY);
   int childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(getHeight(), MeasureSpec.EXACTLY);
   measureChild(v, childWidthMeasureSpec, childHeightMeasureSpec);
   layoutChild(v);
 }