Commit e6a92b9e authored by Boris Sazonov's avatar Boris Sazonov Committed by Commit Bot

[Android] Fix BottomSheet layout issues

Fixes the issue when BottomSheet would pass incorrect width to
View.measure, resulting in misaligned text views. More details:
https://crbug.com/1140983#c6.

Bug: 1140983
Change-Id: Ic6824f7727555bfb1c8ecff61d7564197adf0150
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494920Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821742}
parent cd957e02
...@@ -1041,7 +1041,8 @@ class BottomSheet extends FrameLayout ...@@ -1041,7 +1041,8 @@ class BottomSheet extends FrameLayout
} }
mSheetContent.getContentView().measure( mSheetContent.getContentView().measure(
MeasureSpec.makeMeasureSpec(mContainerWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(
mBottomSheetContentContainer.getMeasuredWidth(), MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(getMaxContentHeight(), MeasureSpec.AT_MOST)); MeasureSpec.makeMeasureSpec(getMaxContentHeight(), MeasureSpec.AT_MOST));
mContentDesiredHeight = mSheetContent.getContentView().getMeasuredHeight(); mContentDesiredHeight = mSheetContent.getContentView().getMeasuredHeight();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment