70% height for payment handler window on Android. |
|||||
Issue description70% height for payment handler window on Android.
,
Aug 9
,
Aug 9
You probably have to change the Activity theme to be translucent to start.
,
Aug 24
Thank you all for your help! Was able to achieve translucent activity, but probably should disable scrolling of the toolbar, because it does not look right. Hope it's possible!
,
Aug 24
,
Aug 24
,
Aug 24
For custom tabs, I think you just need to tweak the intent: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java?l=393 It supports disabling the controls being hidden.
,
Aug 24
Nice! Thank you.
,
Aug 30
Does anyone know why the FLAG_DIM_BEHIND dims only behind the activity in Android Pie, but also dims inside of the activity on Android Nougat? This is chrome_public_apk in both cases.
,
Aug 31
So it looks like it's dimming the web contents only of the CustomTabActivity. I'm not sure why this is happening - my guess would be because that part is put together by the compositor, and maybe the compositor gets dimmed in the background Activity? That is unfortunate though. Can you do something like set the CustomTabActivity's background to something semi-transparent? That would achieve a similar effect (though maybe check the performance, I'm not sure if partially transparent takes more effort than fully transparent).
,
Sep 13
Dimming the background using a fullscreen semi-transparent dialog. Reuses the code in PaymentRequestUI.java, which is a fullscreen semi-transparent dialog with opaque content at the bottom of the dialog.
,
Sep 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/548b91aebddb226d31ddf909b221dd29b803e0c9 commit 548b91aebddb226d31ddf909b221dd29b803e0c9 Author: Rouslan Solomakhin <rouslan@chromium.org> Date: Wed Sep 26 19:23:31 2018 [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} [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/AndroidManifest.xml [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/res/values-v17/styles.xml [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/res/values/dimens.xml [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java [add] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PaymentHandlerActivity.java [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java [add] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/DimmingDialog.java [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUiErrorView.java [modify] https://crrev.com/548b91aebddb226d31ddf909b221dd29b803e0c9/chrome/android/java_sources.gni
,
Sep 26
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by rouslan@chromium.org
, Aug 9109 KB
109 KB View Download