Merge "Constrain FastScroller max width to be >= 0" into mnc-dev

This commit is contained in:
Alan Viverette
2015-06-24 18:22:31 +00:00
committed by Android (Google) Code Review

View File

@@ -660,7 +660,7 @@ class FastScroller {
maxWidth = containerWidth - adjacent.getRight();
}
final int adjMaxWidth = maxWidth - marginLeft - marginRight;
final int adjMaxWidth = Math.max(0, maxWidth - marginLeft - marginRight);
final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(adjMaxWidth, MeasureSpec.AT_MOST);
final int heightMeasureSpec = MeasureSpec.makeSafeMeasureSpec(container.height(),
MeasureSpec.UNSPECIFIED);