diff --git a/res/layout/storage_wizard_footer.xml b/res/layout/storage_wizard_footer.xml
deleted file mode 100644
index a4cda18a7be..00000000000
--- a/res/layout/storage_wizard_footer.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/res/layout/storage_wizard_generic.xml b/res/layout/storage_wizard_generic.xml
index 77aff9c5a00..0e7c1fdb951 100644
--- a/res/layout/storage_wizard_generic.xml
+++ b/res/layout/storage_wizard_generic.xml
@@ -19,8 +19,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:sucFooter="@layout/storage_wizard_footer">
+ android:layout_height="match_parent">
+ android:layout_height="match_parent">
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/res/layout/storage_wizard_progress.xml b/res/layout/storage_wizard_progress.xml
index e1d685bace3..a68750f66ab 100644
--- a/res/layout/storage_wizard_progress.xml
+++ b/res/layout/storage_wizard_progress.xml
@@ -19,8 +19,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:sucFooter="@layout/storage_wizard_footer">
+ android:layout_height="match_parent">
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/com/android/settings/deviceinfo/StorageWizardBase.java b/src/com/android/settings/deviceinfo/StorageWizardBase.java
index 50c908acc8d..9950d3ffaa0 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardBase.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardBase.java
@@ -35,7 +35,6 @@ import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
-import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
@@ -45,6 +44,8 @@ import androidx.fragment.app.FragmentActivity;
import com.android.settings.R;
import com.android.settingslib.Utils;
+import com.google.android.setupcompat.item.FooterButton;
+import com.google.android.setupcompat.template.ButtonFooterMixin;
import com.google.android.setupdesign.GlifLayout;
import java.text.NumberFormat;
@@ -62,8 +63,9 @@ public abstract class StorageWizardBase extends FragmentActivity {
protected VolumeInfo mVolume;
protected DiskInfo mDisk;
- private Button mBack;
- private Button mNext;
+ private ButtonFooterMixin mButtonFooterMixin;
+ private FooterButton mBack;
+ private FooterButton mNext;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -92,8 +94,25 @@ public abstract class StorageWizardBase extends FragmentActivity {
public void setContentView(@LayoutRes int layoutResID) {
super.setContentView(layoutResID);
- mBack = requireViewById(R.id.storage_back_button);
- mNext = requireViewById(R.id.storage_next_button);
+ mButtonFooterMixin = getGlifLayout().getMixin(ButtonFooterMixin.class);
+ mButtonFooterMixin.setSecondaryButton(
+ new FooterButton(
+ this,
+ R.string.wizard_back,
+ this::onNavigateBack,
+ FooterButton.ButtonType.OTHER,
+ R.style.SuwGlifButton_Secondary)
+ );
+ mButtonFooterMixin.setPrimaryButton(
+ new FooterButton(
+ this,
+ R.string.wizard_next,
+ this::onNavigateNext,
+ FooterButton.ButtonType.NEXT,
+ R.style.SuwGlifButton_Primary)
+ );
+ mBack = mButtonFooterMixin.getSecondaryButton();
+ mNext = mButtonFooterMixin.getPrimaryButton();
setIcon(com.android.internal.R.drawable.ic_sd_card_48dp);
}
@@ -104,11 +123,11 @@ public abstract class StorageWizardBase extends FragmentActivity {
super.onDestroy();
}
- protected Button getBackButton() {
+ protected FooterButton getBackButton() {
return mBack;
}
- protected Button getNextButton() {
+ protected FooterButton getNextButton() {
return mNext;
}
diff --git a/src/com/android/settings/deviceinfo/StorageWizardInit.java b/src/com/android/settings/deviceinfo/StorageWizardInit.java
index 51dd74bdb3e..907f58c6160 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardInit.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardInit.java
@@ -30,7 +30,6 @@ import com.android.settings.R;
import com.android.settings.overlay.FeatureFactory;
public class StorageWizardInit extends StorageWizardBase {
- private Button mExternal;
private Button mInternal;
private boolean mIsPermittedToAdopt;
@@ -49,7 +48,6 @@ public class StorageWizardInit extends StorageWizardBase {
setHeaderText(R.string.storage_wizard_init_v2_title, getDiskShortDescription());
- mExternal = requireViewById(R.id.storage_wizard_init_external);
mInternal = requireViewById(R.id.storage_wizard_init_internal);
setBackButtonText(R.string.storage_wizard_init_v2_later);