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

Commit f41bbae1 authored by Pasty Chang's avatar Pasty Chang Committed by Android (Google) Code Review
Browse files

Merge "Change to use footer button of setupcompat"

parents 0c4214a2 103409bd
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
@@ -6746,7 +6746,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