[Payment Handler][CCT] 70% height payment handler window.
Before this patch, Chrome Custom Tab would always be 100% height in all
cases, including for showing a Payment Handler page. This hid the shop
page from the user and increased the chance of the shop page renderer
being killed.
This patch adds a PaymentHandlerActivity that extends CustomTabActivity
with a custom theme that has transparent background. The
PaymentHandler-specific functionality is moved from CustomTabActivity
into the PaymentHandlerActivity. This activity is 70% of the display
height ("bottom sheet"), unless that's less than 500dp, in which case
the height is 500dp. If a device rotates, the window is either in bottom
sheet or fullscreen mode, depending on the amount of available vertical
space.
The underlying activity is dimmed by DimmingDialog, which is a
fullscreen semi-transparent dialog. This was refactored out of
PaymentRequestUI, which now uses the DimmingDialog and optionally adds
opaque content at the bottom.
After this patch, payment handlers are displayed in a bottom sheet with
dimmed background.
Bug: 872833
Change-Id: I4c104373f3e44130d1217cbf2c6923be3b63d1a1
Reviewed-on: https://chromium-review.googlesource.com/1169636
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by:
Peter Conn <peconn@chromium.org>
Reviewed-by:
Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594424}
Showing
This diff is collapsed.
Please register or sign in to comment