Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 103409bd authored by pastychang's avatar pastychang
Browse files

Change to use footer button of setupcompat

Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I0eba5f8fff37bbb13b54a4d41290ae9363905f96
parent 887fa5c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,6 +39,6 @@
        style="@style/SuwGlifButton.Primary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/suw_next_button_label" />
        android:text="@string/wizard_next" />

</com.google.android.setupdesign.view.ButtonBarLayout>
+1 −1
Original line number Diff line number Diff line
@@ -39,6 +39,6 @@
        style="@style/SuwGlifButton.Primary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/suw_next_button_label" />
        android:text="@string/wizard_next" />

</com.google.android.setupdesign.view.ButtonBarLayout>
+2 −2
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
        android:layout_height="wrap_content"
        android:onClick="onNavigateBack"
        android:visibility="gone"
        android:text="@string/suw_back_button_label" />
        android:text="@string/wizard_back" />

    <Space
        android:layout_width="0dp"
@@ -41,6 +41,6 @@
        android:layout_height="wrap_content"
        android:onClick="onNavigateNext"
        android:visibility="gone"
        android:text="@string/suw_next_button_label" />
        android:text="@string/wizard_next" />

</LinearLayout>
+1 −1
Original line number Diff line number Diff line
@@ -6733,7 +6733,7 @@
    <string name="wizard_back">Back</string>
    <!-- Wizard next button label [CHAR LIMIT=25] -->
    <string name="wizard_next">Next</string>
    <!-- Wizard next button label [CHAR LIMIT=25] -->
    <!-- Wizard finish button label [CHAR LIMIT=25] -->
    <string name="wizard_finish">Finish</string>
    <!-- An option in a photo selection dialog, if there is no photo yet [CHAR LIMIT=50] -->
+13 −8
Original line number Diff line number Diff line
@@ -66,7 +66,9 @@ import com.android.settings.password.ConfirmLockPattern;
import com.android.settingslib.RestrictedLockUtilsInternal;

import com.google.android.setupcompat.TemplateLayout;
import com.google.android.setupdesign.template.ButtonFooterMixin;
import com.google.android.setupcompat.item.FooterButton;
import com.google.android.setupcompat.item.FooterButton.ButtonType;
import com.google.android.setupcompat.template.ButtonFooterMixin;

import java.util.List;

@@ -96,7 +98,7 @@ public class MasterClear extends InstrumentedFragment implements OnGlobalLayoutL

    private View mContentView;
    @VisibleForTesting
    Button mInitiateButton;
    FooterButton mInitiateButton;
    private View mExternalStorageContainer;
    @VisibleForTesting
    CheckBox mExternalStorage;
@@ -416,12 +418,15 @@ public class MasterClear extends InstrumentedFragment implements OnGlobalLayoutL

        final TemplateLayout layout = mContentView.findViewById(R.id.setup_wizard_layout);
        final ButtonFooterMixin buttonFooterMixin = layout.getMixin(ButtonFooterMixin.class);
        buttonFooterMixin.removeAllViews();
        buttonFooterMixin.addSpace();
        buttonFooterMixin.addSpace();
        mInitiateButton = buttonFooterMixin.addButton(R.string.master_clear_button_text,
                R.style.SuwGlifButton_Primary);
        mInitiateButton.setOnClickListener(mInitiateListener);
        buttonFooterMixin.setPrimaryButton(
                new FooterButton(
                        getActivity(),
                        R.string.master_clear_button_text,
                        mInitiateListener,
                        ButtonType.OTHER,
                        R.style.SuwGlifButton_Primary)
        );
        mInitiateButton = buttonFooterMixin.getPrimaryButton();
    }

    private void getContentDescription(View v, StringBuffer description) {
Loading