Skip to content

Commit

Permalink
Merge pull request #2613 from ayeung/timob-9966
Browse files Browse the repository at this point in the history
TIMOB-9966: Android: ScrollView not scrolling with horizontal layout
  • Loading branch information
Opie Cyrus committed Jul 20, 2012
2 parents 6d95a75 + 4f56034 commit f7dc687
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,16 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
maxWidth += getPaddingLeft() + getPaddingRight();
maxHeight += getPaddingTop() + getPaddingBottom();

// Compute the maxHeight based on the number of horizontal rows for horizontal layout with wrap
if (isHorizontalArrangement() && enableHorizontalWrap && w != 0) {
int horizontalRows = (maxWidth / w);
if (horizontalRows > 1) {
// Reset the max width to the width of the parent (that should be the max width before we wrap)
maxWidth = w;
maxHeight *= horizontalRows;
}
}

// Account for border
//int padding = Math.round(borderHelper.calculatePadding());
//maxWidth += padding;
Expand Down

0 comments on commit f7dc687

Please sign in to comment.