Commit dcdd1725 authored by rouslan's avatar rouslan Committed by Commit bot

Re-expand payments UI after cancelling out of a payment app.

If the user launches a payment app from expanded payments UI and cancels
the payment in the app, then the payments UI should again be expanded.

BUG=658222

Review-Url: https://codereview.chromium.org/2441833003
Cr-Commit-Position: refs/heads/master@{#427135}
parent 2d772547
......@@ -829,18 +829,20 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View
// Turn the bottom sheet back into a collapsed bottom sheet showing only the spinner.
// TODO(dfalcantara): Animate this: https://crbug.com/621955
FrameLayout.LayoutParams params =
(FrameLayout.LayoutParams) mRequestView.getLayoutParams();
params.width = LayoutParams.MATCH_PARENT;
params.height = LayoutParams.WRAP_CONTENT;
params.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
((FrameLayout.LayoutParams) mRequestView.getLayoutParams()).height =
LayoutParams.WRAP_CONTENT;
mRequestView.requestLayout();
} else {
mRequestView.removeView(mSpinnyLayout);
mRequestView.addView(mPaymentContainer);
mRequestView.addView(mButtonBar);
if (mIsShowingEditDialog) expand(mSelectedSection);
if (mIsShowingEditDialog) {
((FrameLayout.LayoutParams) mRequestView.getLayoutParams()).height =
LayoutParams.MATCH_PARENT;
mRequestView.requestLayout();
expand(mSelectedSection);
}
}
}
......
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