Commit 4fd6bda6 authored by Tomasz Wiszkowski's avatar Tomasz Wiszkowski Committed by Commit Bot

Ensure MATCH_PARENT is honored by SimpleHorizontalLayoutView.

This change ensures children with LayoutParams.height set to MATCH_PARENT
are actually sized to match the height of BaseSuggestionView.

Bug: 1027697
Change-Id: I89b0c40aa5246b0f4fa5c251bcb8a995caafc466
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1934836Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Ender <ender@google.com>
Cr-Commit-Position: refs/heads/master@{#718906}
parent 3a62fa67
......@@ -102,7 +102,7 @@ class SimpleHorizontalLayoutView extends ViewGroup {
dynamicView.measure(MeasureSpec.makeMeasureSpec(contentViewWidth, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
final int heightPx = dynamicView.getMeasuredHeight();
heightSpec = MeasureSpec.makeMeasureSpec(heightPx, MeasureSpec.AT_MOST);
heightSpec = MeasureSpec.makeMeasureSpec(heightPx, MeasureSpec.EXACTLY);
// Apply measured dimensions to all children.
for (int index = 0; index < getChildCount(); ++index) {
......
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