Commit 0282b7ca authored by Mathias Carlen's avatar Mathias Carlen Committed by Commit Bot

[Autofill Assistant] Remove cancel button.

Before this patch, the main payment request view contained a cancel
button. That button is confusing since it shuts down autofill
assistant.

This patch removes the button. The payment request editor mode still
contains a cancel that goes back to the main payment request view.

R=arbesser@google.com, twellington@chromium.org

Bug: 806868
Change-Id: Ib5805d040f351035adbe209af149fb697715f949
Reviewed-on: https://chromium-review.googlesource.com/c/1337622Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Mathias Carlen <mcarlen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608379}
parent 979db04c
......@@ -15,17 +15,6 @@
android:orientation="horizontal"
android:visibility="gone" >
<!-- TODO(crbug.com/806868): Make the autofill assistant chip layouts into
styles and use those for these buttons.
-->
<org.chromium.ui.widget.ButtonCompat
android:id="@+id/button_secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="36dp"
android:text="@string/cancel"
style="@style/TextButton" />
<org.chromium.ui.widget.ButtonCompat
android:id="@+id/button_primary"
android:layout_width="wrap_content"
......
......@@ -109,7 +109,6 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View
private FadingEdgeScrollView mPaymentContainer;
private LinearLayout mPaymentContainerLayout;
private ViewGroup mBottomBar;
private Button mCancelButton;
private Button mPayButton;
private View mSpinnyLayout;
private CheckBox mTermsCheckBox;
......@@ -307,8 +306,6 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View
mBottomBar = (ViewGroup) mRequestView.findViewById(R.id.bottom_bar);
mPayButton = (Button) mBottomBar.findViewById(R.id.button_primary);
mPayButton.setOnClickListener(this);
mCancelButton = (Button) mBottomBar.findViewById(R.id.button_secondary);
mCancelButton.setOnClickListener(this);
// Terms and services accepted checkbox. The state is passively propagated along to the
// client when the pay/continue button is clicked.
......@@ -601,9 +598,6 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View
expand(mPaymentMethodSection);
} else if (v == mPayButton) {
processPayButton();
} else if (v == mCancelButton) {
dismiss();
return;
}
updatePayButtonEnabled();
......@@ -737,9 +731,6 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View
for (int i = 0; i < mSectionSeparators.size(); i++) mSectionSeparators.get(i).expand();
mPaymentContainerLayout.requestLayout();
// Switch the 'edit' button to a 'cancel' button.
mCancelButton.setText(mContext.getString(R.string.cancel));
// Disable all but the first button.
updateSectionButtons();
......
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