diff --git a/res/layout/choose_lock_password.xml b/res/layout/choose_lock_password.xml
index 68583b5..b779526 100644
--- a/res/layout/choose_lock_password.xml
+++ b/res/layout/choose_lock_password.xml
@@ -17,11 +17,11 @@
 <com.google.android.setupdesign.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:settings="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:icon="@drawable/ic_lock"
     android:importantForAutofill="noExcludeDescendants"
-    settings:sucFooter="@layout/choose_lock_password_footer"
     settings:sucHeaderText="@string/lockpassword_choose_your_screen_lock_header">
 
     <LinearLayout
diff --git a/res/layout/choose_lock_password_footer.xml b/res/layout/choose_lock_password_footer.xml
deleted file mode 100644
index 58d80cf..0000000
--- a/res/layout/choose_lock_password_footer.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2017 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License")
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    style="@style/SudGlifButtonBar"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content">
-
-    <!-- left : skip -->
-    <Button android:id="@+id/skip_button"
-        style="@style/SudGlifButton.Secondary"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/skip_label"
-        android:visibility="gone" />
-
-
-    <!-- left : clear -->
-    <Button android:id="@+id/clear_button"
-        style="@style/SudGlifButton.Secondary"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:visibility="gone"
-        android:text="@string/lockpassword_clear_label" />
-
-    <Space
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:layout_weight="1" />
-
-    <!-- right : continue -->
-    <Button android:id="@+id/next_button"
-        style="@style/SudGlifButton.Primary"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/next_label" />
-
-</LinearLayout>
diff --git a/src/com/android/settings/password/ChooseLockPassword.java b/src/com/android/settings/password/ChooseLockPassword.java
index 6ff93f3..0ae664c 100644
--- a/src/com/android/settings/password/ChooseLockPassword.java
+++ b/src/com/android/settings/password/ChooseLockPassword.java
@@ -47,7 +47,6 @@
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
 import android.view.inputmethod.EditorInfo;
-import android.widget.Button;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 import android.widget.TextView.OnEditorActionListener;
@@ -69,6 +68,8 @@
 import com.android.settings.notification.RedactionInterstitial;
 import com.android.settings.widget.ImeAwareEditText;
 
+import com.google.android.setupcompat.item.FooterButton;
+import com.google.android.setupcompat.template.ButtonFooterMixin;
 import com.google.android.setupdesign.GlifLayout;
 
 import java.util.ArrayList;
@@ -168,8 +169,7 @@
     }
 
     public static class ChooseLockPasswordFragment extends InstrumentedFragment
-            implements OnClickListener, OnEditorActionListener, TextWatcher,
-            SaveAndFinishWorker.Listener {
+            implements OnEditorActionListener, TextWatcher, SaveAndFinishWorker.Listener {
         private static final String KEY_FIRST_PIN = "first_pin";
         private static final String KEY_UI_STAGE = "ui_stage";
         private static final String KEY_CURRENT_PASSWORD = "current_password";
@@ -210,9 +210,8 @@
         private String mFirstPin;
         private RecyclerView mPasswordRestrictionView;
         protected boolean mIsAlphaMode;
-        protected Button mSkipButton;
-        private Button mClearButton;
-        private Button mNextButton;
+        protected FooterButton mSkipOrClearButton;
+        private FooterButton mNextButton;
         private TextView mMessage;
 
         private TextChangedHandler mTextChangedHandler;
@@ -408,13 +407,25 @@
             ViewGroup container = view.findViewById(R.id.password_container);
             container.setOpticalInsets(Insets.NONE);
 
-            mSkipButton = view.findViewById(R.id.skip_button);
-            mSkipButton.setOnClickListener(this);
-            mNextButton = view.findViewById(R.id.next_button);
-            mNextButton.setOnClickListener(this);
-            mClearButton = view.findViewById(R.id.clear_button);
-            mClearButton.setOnClickListener(this);
-
+            final ButtonFooterMixin mixin = mLayout.getMixin(ButtonFooterMixin.class);
+            mixin.setSecondaryButton(
+                    new FooterButton.Builder(getActivity())
+                            .setText(R.string.lockpassword_clear_label)
+                            .setListener(this::onSkipOrClearButtonClick)
+                            .setButtonType(FooterButton.ButtonType.SKIP)
+                            .setTheme(R.style.SudGlifButton_Secondary)
+                            .build()
+            );
+            mixin.setPrimaryButton(
+                    new FooterButton.Builder(getActivity())
+                            .setText(R.string.next_label)
+                            .setListener(this::onNextButtonClick)
+                            .setButtonType(FooterButton.ButtonType.NEXT)
+                            .setTheme(R.style.SudGlifButton_Primary)
+                            .build()
+            );
+            mSkipOrClearButton = mixin.getSecondaryButton();
+            mNextButton = mixin.getPrimaryButton();
 
             mMessage = view.findViewById(R.id.message);
             if (mForFingerprint) {
@@ -777,19 +788,15 @@
         }
 
         protected void setNextText(int text) {
-            mNextButton.setText(text);
+            mNextButton.setText(getActivity(), text);
         }
 
-        public void onClick(View v) {
-            switch (v.getId()) {
-                case R.id.next_button:
-                    handleNext();
-                    break;
+        protected void onSkipOrClearButtonClick(View view) {
+            mPasswordEntry.setText("");
+        }
 
-                case R.id.clear_button:
-                    mPasswordEntry.setText("");
-                    break;
-            }
+        protected void onNextButtonClick(View view) {
+            handleNext();
         }
 
         public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
@@ -894,13 +901,12 @@
                 mPasswordRequirementAdapter.setRequirements(messages);
                 // Enable/Disable the next button accordingly.
                 setNextEnabled(errorCode == NO_ERROR);
-                mClearButton.setVisibility(View.GONE);
             } else {
                 // Hide password requirement view when we are just asking user to confirm the pw.
                 mPasswordRestrictionView.setVisibility(View.GONE);
                 setHeaderText(getString(mUiStage.getHint(mIsAlphaMode, getStageType())));
                 setNextEnabled(canInput && length >= mPasswordMinLength);
-                mClearButton.setVisibility(toVisibility(canInput && length > 0));
+                mSkipOrClearButton.setVisibility(toVisibility(canInput && length > 0));
             }
             int message = mUiStage.getMessage(mIsAlphaMode, getStageType());
             if (message != 0) {
diff --git a/src/com/android/settings/password/SetupChooseLockPassword.java b/src/com/android/settings/password/SetupChooseLockPassword.java
index 2c443c2..213351b 100644
--- a/src/com/android/settings/password/SetupChooseLockPassword.java
+++ b/src/com/android/settings/password/SetupChooseLockPassword.java
@@ -72,8 +72,11 @@
     public static class SetupChooseLockPasswordFragment extends ChooseLockPasswordFragment
             implements OnLockTypeSelectedListener {
 
+        private static final String TAG_SKIP_SCREEN_LOCK_DIALOG = "skip_screen_lock_dialog";
+
         @Nullable
         private Button mOptionsButton;
+        private boolean mLeftButtonIsSkip;
 
         @Override
         public void onViewCreated(View view, Bundle savedInstanceState) {
@@ -92,26 +95,22 @@
             if (showOptionsButton && anyOptionsShown) {
                 mOptionsButton = view.findViewById(R.id.screen_lock_options);
                 mOptionsButton.setVisibility(View.VISIBLE);
-                mOptionsButton.setOnClickListener(this);
+                mOptionsButton.setOnClickListener((btn) ->
+                        ChooseLockTypeDialogFragment.newInstance(mUserId)
+                                .show(getChildFragmentManager(), TAG_SKIP_SCREEN_LOCK_DIALOG));
             }
         }
 
         @Override
-        public void onClick(View v) {
-            switch (v.getId()) {
-                case R.id.screen_lock_options:
-                    ChooseLockTypeDialogFragment.newInstance(mUserId)
-                            .show(getChildFragmentManager(), null);
-                    break;
-                case R.id.skip_button:
-                    SetupSkipDialog dialog = SetupSkipDialog.newInstance(
-                            getActivity().getIntent()
-                                    .getBooleanExtra(SetupSkipDialog.EXTRA_FRP_SUPPORTED, false));
-                    dialog.show(getFragmentManager());
-                    break;
-                default:
-                    super.onClick(v);
+        protected void onSkipOrClearButtonClick(View view) {
+            if (mLeftButtonIsSkip) {
+                SetupSkipDialog dialog = SetupSkipDialog.newInstance(
+                        getActivity().getIntent()
+                                .getBooleanExtra(SetupSkipDialog.EXTRA_FRP_SUPPORTED, false));
+                dialog.show(getFragmentManager());
+                return;
             }
+            super.onSkipOrClearButtonClick(view);
         }
 
         @Override
@@ -137,9 +136,11 @@
             super.updateUi();
             // Show the skip button during SUW but not during Settings > Biometric Enrollment
             if (mUiStage == Stage.Introduction) {
-                mSkipButton.setVisibility(View.VISIBLE);
+                mSkipOrClearButton.setText(getActivity(), R.string.skip_label);
+                mLeftButtonIsSkip = true;
             } else {
-                mSkipButton.setVisibility(View.GONE);
+                mSkipOrClearButton.setText(getActivity(), R.string.lockpassword_clear_label);
+                mLeftButtonIsSkip = false;
             }
 
             if (mOptionsButton != null) {
diff --git a/src/com/android/settings/password/SetupChooseLockPattern.java b/src/com/android/settings/password/SetupChooseLockPattern.java
index 736cd00..3a69844 100644
--- a/src/com/android/settings/password/SetupChooseLockPattern.java
+++ b/src/com/android/settings/password/SetupChooseLockPattern.java
@@ -57,6 +57,8 @@
     public static class SetupChooseLockPatternFragment extends ChooseLockPatternFragment
             implements ChooseLockTypeDialogFragment.OnLockTypeSelectedListener {
 
+        private static final String TAG_SKIP_SCREEN_LOCK_DIALOG = "skip_screen_lock_dialog";
+
         @Nullable
         private Button mOptionsButton;
         private boolean mLeftButtonIsSkip;
@@ -69,7 +71,7 @@
                 mOptionsButton = view.findViewById(R.id.screen_lock_options);
                 mOptionsButton.setOnClickListener((btn) ->
                         ChooseLockTypeDialogFragment.newInstance(mUserId)
-                                .show(getChildFragmentManager(), null));
+                                .show(getChildFragmentManager(), TAG_SKIP_SCREEN_LOCK_DIALOG));
             }
             // Show the skip button during SUW but not during Settings > Biometric Enrollment
             mSkipOrClearButton.setOnClickListener(this::onSkipOrClearButtonClick);
diff --git a/tests/robotests/src/com/android/settings/password/SetupChooseLockPasswordTest.java b/tests/robotests/src/com/android/settings/password/SetupChooseLockPasswordTest.java
index bee66cc..946ab69 100644
--- a/tests/robotests/src/com/android/settings/password/SetupChooseLockPasswordTest.java
+++ b/tests/robotests/src/com/android/settings/password/SetupChooseLockPasswordTest.java
@@ -37,6 +37,9 @@
 import com.android.settings.testutils.shadow.ShadowUtils;
 import com.android.settings.widget.ScrollToParentEditText;
 
+import com.google.android.setupcompat.PartnerCustomizationLayout;
+import com.google.android.setupcompat.template.ButtonFooterMixin;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -137,17 +140,19 @@
     public void createActivity_skipButtonInIntroductionStage_shouldBeVisible() {
         SetupChooseLockPassword activity = createSetupChooseLockPassword();
 
-        Button skipButton = activity.findViewById(R.id.skip_button);
-        assertThat(skipButton).isNotNull();
-        assertThat(skipButton.getVisibility()).isEqualTo(View.VISIBLE);
+        final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
+        final Button skipOrClearButton =
+                layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView();
+        assertThat(skipOrClearButton).isNotNull();
+        assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.VISIBLE);
 
-        skipButton.performClick();
-        AlertDialog chooserDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
+        skipOrClearButton.performClick();
+        final AlertDialog chooserDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
         assertThat(chooserDialog).isNotNull();
     }
 
     @Test
-    public void createActivity_inputPasswordInConfirmStage_clearButtonShouldBeVisible() {
+    public void createActivity_inputPasswordInConfirmStage_clearButtonShouldBeShown() {
         SetupChooseLockPassword activity = createSetupChooseLockPassword();
 
         SetupChooseLockPasswordFragment fragment =
@@ -158,15 +163,17 @@
         passwordEntry.setText("");
         fragment.updateStage(Stage.NeedToConfirm);
 
-        Button skipButton = activity.findViewById(R.id.skip_button);
-        Button clearButton = activity.findViewById(R.id.clear_button);
-        assertThat(skipButton.getVisibility()).isEqualTo(View.GONE);
-        assertThat(clearButton.getVisibility()).isEqualTo(View.GONE);
+        final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
+        final Button skipOrClearButton =
+                layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView();
+        assertThat(skipOrClearButton.isEnabled()).isTrue();
+        assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.GONE);
 
         passwordEntry.setText("1234");
         fragment.updateUi();
-        assertThat(skipButton.getVisibility()).isEqualTo(View.GONE);
-        assertThat(clearButton.getVisibility()).isEqualTo(View.VISIBLE);
+        assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.VISIBLE);
+        assertThat(skipOrClearButton.getText())
+                .isEqualTo(application.getString(R.string.lockpassword_clear_label));
     }
 
     private SetupChooseLockPassword createSetupChooseLockPassword() {
diff --git a/tests/unit/src/com/android/settings/password/ChooseLockPasswordTest.java b/tests/unit/src/com/android/settings/password/ChooseLockPasswordTest.java
index 57a4965..269be26 100644
--- a/tests/unit/src/com/android/settings/password/ChooseLockPasswordTest.java
+++ b/tests/unit/src/com/android/settings/password/ChooseLockPasswordTest.java
@@ -24,12 +24,16 @@
 import static androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
 import static androidx.test.espresso.matcher.ViewMatchers.withId;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import static org.hamcrest.CoreMatchers.not;
 
+import android.app.Activity;
 import android.app.Instrumentation;
 import android.content.Context;
 import android.content.Intent;
 import android.view.KeyEvent;
+import android.view.View;
 
 import androidx.test.InstrumentationRegistry;
 import androidx.test.espresso.action.ViewActions;
@@ -38,6 +42,9 @@
 
 import com.android.settings.R;
 
+import com.google.android.setupcompat.PartnerCustomizationLayout;
+import com.google.android.setupcompat.template.ButtonFooterMixin;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -54,28 +61,41 @@
     }
 
     @Test
-    public void clearNotVisible_when_activityLaunchedInitially() {
-        mInstrumentation.startActivitySync(new Intent(mContext, ChooseLockPassword.class));
-        onView(withId(R.id.clear_button)).check(matches(
-                withEffectiveVisibility(ViewMatchers.Visibility.GONE)));
+    public void clearIsNotShown_when_activityLaunchedInitially() {
+        final Activity activity =
+                mInstrumentation.startActivitySync(new Intent(mContext, ChooseLockPassword.class)
+                        .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
+        final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
+        assertThat(
+                layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView().getVisibility())
+                        .isEqualTo(View.GONE);
     }
 
     @Test
-    public void clearNotEnabled_when_nothingEntered() {
-        mInstrumentation.startActivitySync(new Intent(mContext, ChooseLockPassword.class));
+    public void clearIsNotShown_when_nothingEntered() {
+        final Activity activity =
+                mInstrumentation.startActivitySync(new Intent(mContext, ChooseLockPassword.class));
+        final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
         onView(withId(R.id.password_entry)).perform(ViewActions.typeText("1234"))
                 .perform(pressKey(KeyEvent.KEYCODE_ENTER));
-        onView(withId(R.id.clear_button)).check(matches(isDisplayed()))
-            .check(matches(not(isEnabled())));
+        assertThat(
+                layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView().getVisibility())
+                        .isEqualTo(View.GONE);
     }
 
     @Test
-    public void clearEnabled_when_somethingEnteredToConfirm() {
-        mInstrumentation.startActivitySync(new Intent(mContext, ChooseLockPassword.class));
+    public void clearIsShown_when_somethingEnteredToConfirm() {
+        final Activity activity =
+                mInstrumentation.startActivitySync(new Intent(mContext, ChooseLockPassword.class));
+        final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
         onView(withId(R.id.password_entry)).perform(ViewActions.typeText("1234"))
                 .perform(pressKey(KeyEvent.KEYCODE_ENTER))
                 .perform(ViewActions.typeText("1"));
         // clear should be present if text field contains content
-        onView(withId(R.id.clear_button)).check(matches(isDisplayed()));
+        assertThat(layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView().getText())
+                .isEqualTo(mContext.getString(R.string.lockpassword_clear_label));
+        assertThat(
+                layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView().getVisibility())
+                        .isEqualTo(View.VISIBLE);
     }
 }
diff --git a/tests/unit/src/com/android/settings/password/SetupChooseLockPasswordAppTest.java b/tests/unit/src/com/android/settings/password/SetupChooseLockPasswordAppTest.java
index 1b12c54..67c5cce 100644
--- a/tests/unit/src/com/android/settings/password/SetupChooseLockPasswordAppTest.java
+++ b/tests/unit/src/com/android/settings/password/SetupChooseLockPasswordAppTest.java
@@ -30,8 +30,12 @@
 
 import static org.hamcrest.CoreMatchers.not;
 
+import android.content.Context;
 import android.view.KeyEvent;
+import android.view.View;
+import android.widget.Button;
 
+import androidx.test.InstrumentationRegistry;
 import androidx.test.espresso.action.ViewActions;
 import androidx.test.espresso.matcher.ViewMatchers;
 import androidx.test.filters.MediumTest;
@@ -40,6 +44,10 @@
 
 import com.android.settings.R;
 
+import com.google.android.setupcompat.PartnerCustomizationLayout;
+import com.google.android.setupcompat.template.ButtonFooterMixin;
+
+import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -48,6 +56,8 @@
 @MediumTest
 public class SetupChooseLockPasswordAppTest {
 
+    private Context mContext;
+
     @Rule
     public ActivityTestRule<SetupChooseLockPassword> mActivityTestRule =
             new ActivityTestRule<>(
@@ -55,42 +65,56 @@
                     true /* enable touch at launch */,
                     false /* don't launch at every test */);
 
+    @Before
+    public void setUp() {
+        mContext = InstrumentationRegistry.getTargetContext();
+    }
+
     @Test
     public void testSkipDialogIsShown() throws Throwable {
         SetupChooseLockPassword activity = mActivityTestRule.launchActivity(null);
+        PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
+        final Button skipOrClearButton =
+                layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView();
 
-        onView(withId(R.id.cancel_button))
-                .check(matches(withText(R.string.skip_label)))
-                .check(matches(isDisplayed()))
-                .perform(click());
-        onView(withId(android.R.id.button1)).check(matches(isDisplayed())).perform(click());
-
+        assertThat(skipOrClearButton.getText()).isEqualTo(mContext.getString(R.string.skip_label));
+        assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.VISIBLE);
+        skipOrClearButton.performClick();
         assertThat(activity.isFinishing()).named("Is finishing").isTrue();
     }
 
     @Test
-    public void clearNotVisible_when_activityLaunchedInitially() {
-        mActivityTestRule.launchActivity(null);
-        onView(withId(R.id.clear_button)).check(matches(
-                withEffectiveVisibility(ViewMatchers.Visibility.GONE)));
+    public void clearIsNotShown_when_activityLaunchedInitially() {
+        SetupChooseLockPassword activity = mActivityTestRule.launchActivity(null);
+        PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
+        assertThat(layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView().getText())
+                .isEqualTo(mContext.getString(R.string.lockpassword_clear_label));
     }
 
     @Test
-    public void clearNotEnabled_when_nothingEntered() throws Throwable {
-        mActivityTestRule.launchActivity(null);
+    public void clearIsNotShown_when_nothingEntered() throws Throwable {
+        SetupChooseLockPassword activity = mActivityTestRule.launchActivity(null);
+        PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
         onView(withId(R.id.password_entry)).perform(ViewActions.typeText("1234"))
                 .perform(pressKey(KeyEvent.KEYCODE_ENTER));
-        onView(withId(R.id.clear_button)).check(matches(isDisplayed()))
-                .check(matches(not(isEnabled())));
+        assertThat(
+                layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView().getVisibility())
+                        .isEqualTo(View.GONE);
     }
 
     @Test
-    public void clearEnabled_when_somethingEnteredToConfirm() {
+    public void clearIsShown_when_somethingEnteredToConfirm() {
+        SetupChooseLockPassword activity = mActivityTestRule.launchActivity(null);
+        PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
+        onView(withId(R.id.password_entry)).perform(ViewActions.typeText("1234"))
+               .perform(pressKey(KeyEvent.KEYCODE_ENTER));
         mActivityTestRule.launchActivity(null);
         onView(withId(R.id.password_entry)).perform(ViewActions.typeText("1234"))
                 .perform(pressKey(KeyEvent.KEYCODE_ENTER))
                 .perform(ViewActions.typeText("1"));
         // clear should be present if text field contains content
-        onView(withId(R.id.clear_button)).check(matches(isDisplayed()));
+        assertThat(
+                layout.getMixin(ButtonFooterMixin.class).getSecondaryButtonView().getVisibility())
+                        .isEqualTo(View.VISIBLE);
     }
 }
