Skip to content

Commit 63e8618

Browse files
bugfix: childs wasn't layouted correctly in AlwaysOpen mode.
1 parent 67454cd commit 63e8618

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

example/libs/sidemenu.jar

80 Bytes
Binary file not shown.

sidemenu.jar

80 Bytes
Binary file not shown.

src/com/agimind/widget/SlideHolder.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,22 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
7171
return;
7272
}
7373

74+
final int parentLeft = 0;
75+
final int parentTop = 0;
76+
final int parentBottom = b - t;
77+
7478
View menu = getChildAt(0);
7579
int menuWidth = menu.getMeasuredWidth();
7680

77-
menu.layout(l, t, l+menuWidth, b);
81+
menu.layout(parentLeft, parentTop, parentLeft+menuWidth, parentBottom);
7882

7983
View main = getChildAt(1);
80-
main.layout(l + menuWidth, t, l + menuWidth + main.getMeasuredWidth(), b);
84+
main.layout(
85+
parentLeft + menuWidth,
86+
parentTop,
87+
parentLeft + menuWidth + main.getMeasuredWidth(),
88+
parentBottom
89+
);
8190

8291
invalidate();
8392
}

0 commit comments

Comments
 (0)