Skip to content

Commit 669716c

Browse files
Fix measure
1 parent 44da4a2 commit 669716c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/br/nullexcept/mux/view/ViewGroup.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ protected int measureSpec(int parent, int spec, int wrap, int padding) {
4848

4949
protected boolean measureChild(View child) {
5050
LayoutParams params = child.getLayoutParams();
51+
if (child instanceof ViewGroup) {
52+
((ViewGroup) child).measureChildren();
53+
}
5154
Size size = child.onMeasureContent();
5255
Point pos = getChildLocation(child);
5356

@@ -88,6 +91,7 @@ public void measure() {
8891
while (measureChildren()) {
8992
measure();
9093
}
94+
parent.measureChild(this);
9195
measureBounds();
9296
}
9397

0 commit comments

Comments
 (0)