36 protected void onLayout(
boolean changed,
int l,
int t,
int r,
int b) {
37 for (
int i = 0; i < getChildCount(); i++) {
38 View child = getChildAt(i);
39 WindowManager.LayoutParams
params = (WindowManager.LayoutParams) child.getLayoutParams();
40 viewBounds.set(l, t, r,
b);
43 child.getMeasuredWidth(),
44 child.getMeasuredHeight(),
49 child.layout(childRect.left, childRect.top, childRect.right, childRect.bottom);
54 protected void onMeasure(
int widthMeasureSpec,
int heightMeasureSpec) {
55 for (
int i = 0; i < getChildCount(); i++) {
56 View child = getChildAt(i);
57 child.measure(atMost(widthMeasureSpec), atMost(heightMeasureSpec));
59 super.onMeasure(widthMeasureSpec, heightMeasureSpec);