[ExpandablePaymentHandler] Support half state; remove UI gap
Before: 1 PH UI on opening sometimes have a gap beneath ThinWebView. 2 PH UI set ThinWebView height after the toolbar is laid out 3 PH UI doesn't have half state. Cause: For 1, 2, PH UI initialize the height for ThinWebView only when the tab layout changes. Although tab layout change callback is called the when PH UI opens, sometimes the toolbar is not laid out yet so the toolbar height is unknown For 3, BottomSheet's half state is disabled when PH UI set WRAP_CONTENT to fullHeightRatio. Change: * Set height for ThinWebView when tab layout changes and in PH's constructor. * Rather than getting toolbar height from toolbar's layout, get the toolbar height from dimen const directly. * Remove onToolbarLaidOut logic. After: * the gap is gone. * reduced complexity to get toolbar height. * PH UI supports half state. Bug: 1059066, 1059269 Change-Id: I52435a9ec15f87369486ec0551af67878bb6a755 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2090836Reviewed-by:Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:
Rouslan Solomakhin <rouslan@chromium.org> Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Cr-Commit-Position: refs/heads/master@{#747847}
Showing
Please register or sign in to comment