Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIMOB-10003-2_1_X: Android: Ti.UI.SIZE does not work well with nested views #3005

Merged
merged 1 commit into from
Sep 21, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
int maxWidth = 0;
int maxHeight = 0;

// Used for horizontal layout with wrap only
// Used for horizontal layout only
int horizontalRowWidth = 0;
int horizontalRowHeight = 0;

Expand Down Expand Up @@ -312,16 +312,17 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
horizontalRowWidth += childWidth;
maxWidth = Math.max(maxWidth, horizontalRowWidth);
}
horizontalRowHeight = Math.max(horizontalRowHeight, childHeight);

} else {
// For horizontal layout without wrap, just keep on adding the widths since it doesn't wrap
maxWidth += childWidth;
}
horizontalRowHeight = Math.max(horizontalRowHeight, childHeight);

} else {
maxWidth = Math.max(maxWidth, childWidth);

if(isVerticalArrangement()) {
if (isVerticalArrangement()) {
maxHeight += childHeight;
} else {
maxHeight = Math.max(maxHeight, childHeight);
Expand All @@ -330,7 +331,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
}

// Add height for last row in horizontal layout
if (isHorizontalArrangement() && enableHorizontalWrap) {
if (isHorizontalArrangement()) {
maxHeight += horizontalRowHeight;
}

Expand Down