Apply FooterButton builder

FotterButton constructor in setupcompat will be deprecated, change to
use builder.

Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: Ic84b0c91205bf3c770bc658e8eaf2626e4d7bddd
This commit is contained in:
pastychang
2018-12-26 10:46:40 +08:00
parent 2fe6673d9e
commit 908501e40f
12 changed files with 101 additions and 102 deletions

View File

@@ -96,20 +96,20 @@ public abstract class StorageWizardBase extends FragmentActivity {
mButtonFooterMixin = getGlifLayout().getMixin(ButtonFooterMixin.class);
mButtonFooterMixin.setSecondaryButton(
new FooterButton(
this,
R.string.wizard_back,
this::onNavigateBack,
FooterButton.ButtonType.OTHER,
R.style.SuwGlifButton_Secondary)
new FooterButton.Builder(this)
.setText(R.string.wizard_back)
.setListener(this::onNavigateBack)
.setButtonType(FooterButton.ButtonType.OTHER)
.setTheme(R.style.SuwGlifButton_Secondary)
.build()
);
mButtonFooterMixin.setPrimaryButton(
new FooterButton(
this,
R.string.wizard_next,
this::onNavigateNext,
FooterButton.ButtonType.NEXT,
R.style.SuwGlifButton_Primary)
new FooterButton.Builder(this)
.setText(R.string.wizard_next)
.setListener(this::onNavigateNext)
.setButtonType(FooterButton.ButtonType.NEXT)
.setTheme(R.style.SuwGlifButton_Primary)
.build()
);
mBack = mButtonFooterMixin.getSecondaryButton();
mNext = mButtonFooterMixin.getPrimaryButton();