Commit e73c1f26 authored by Liquan (Max) Gu's avatar Liquan (Max) Gu Committed by Commit Bot

[ExpandablePaymentHandler] Half height set to 50%

Before:
Half height is the bottom-sheet default 75%
(BottomSheet#HALF_HEIGHT_RATIO).

After:
Half height is customized to 50%.

Change:
Implement BottomSheetContent#getHalfHeightRatio.

Bug: 1060676

Change-Id: Ib586d4cbc22721b4ecb3b81413dcd3a42bd7fc9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2098264Reviewed-by: default avatarSahel Sharify <sahel@chromium.org>
Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749499}
parent 863fd2b4
......@@ -29,6 +29,7 @@ import org.chromium.ui.modelutil.PropertyModel;
implements BottomSheetObserver, PaymentHandlerToolbarObserver, View.OnLayoutChangeListener {
// The value is picked in order to allow users to see the tab behind this UI.
/* package */ static final float FULL_HEIGHT_RATIO = 0.9f;
/* package */ static final float HALF_HEIGHT_RATIO = 0.5f;
private final PropertyModel mModel;
// Whenever invoked, invoked outside of the WebContentsObserver callbacks.
......
......@@ -83,6 +83,11 @@ import org.chromium.content_public.browser.WebContents;
return PaymentHandlerMediator.FULL_HEIGHT_RATIO;
}
@Override
public float getHalfHeightRatio() {
return PaymentHandlerMediator.HALF_HEIGHT_RATIO;
}
@Override
public boolean hasCustomScrimLifecycle() {
return true;
......
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