Merge "Update back FooterButton visibility for navigation instead of back button" into tm-qpr-dev
This commit is contained in:
@@ -76,36 +76,28 @@ public class StorageWizardInit extends StorageWizardBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBackPressed() {
|
|
||||||
if (mPortable) {
|
|
||||||
super.onBackPressed();
|
|
||||||
} else {
|
|
||||||
mFlipper.showPrevious();
|
|
||||||
setBackButtonText(R.string.wizard_back_adoptable);
|
|
||||||
setHeaderText(R.string.storage_wizard_init_v2_external_title,
|
|
||||||
getDiskShortDescription());
|
|
||||||
setNextButtonText(R.string.storage_wizard_init_v2_external_action);
|
|
||||||
mPortable = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNavigateBack(View v) {
|
public void onNavigateBack(View v) {
|
||||||
if (mPortable == false) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!mIsPermittedToAdopt) {
|
if (!mIsPermittedToAdopt) {
|
||||||
// TODO: Show a message about why this is disabled for guest and
|
// TODO: Show a message about why this is disabled for guest and
|
||||||
// that only an admin user can adopt an sd card.
|
// that only an admin user can adopt an sd card.
|
||||||
|
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
} else if (mPortable == false) {
|
||||||
|
mFlipper.showNext();
|
||||||
|
setHeaderText(R.string.storage_wizard_init_v2_external_title,
|
||||||
|
getDiskShortDescription());
|
||||||
|
setNextButtonText(R.string.storage_wizard_init_v2_external_action);
|
||||||
|
setBackButtonText(R.string.wizard_back_adoptable);
|
||||||
|
setBackButtonVisibility(View.VISIBLE);
|
||||||
|
mPortable = true;
|
||||||
} else {
|
} else {
|
||||||
mFlipper.showNext();
|
mFlipper.showNext();
|
||||||
setHeaderText(R.string.storage_wizard_init_v2_internal_title,
|
setHeaderText(R.string.storage_wizard_init_v2_internal_title,
|
||||||
getDiskShortDescription());
|
getDiskShortDescription());
|
||||||
setNextButtonText(R.string.storage_wizard_init_v2_internal_action);
|
setNextButtonText(R.string.storage_wizard_init_v2_internal_action);
|
||||||
setBackButtonVisibility(View.INVISIBLE);
|
setBackButtonText(R.string.wizard_back_adoptable);
|
||||||
|
setBackButtonVisibility(View.VISIBLE);
|
||||||
mPortable = false;
|
mPortable = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -162,4 +154,4 @@ public class StorageWizardInit extends StorageWizardBase {
|
|||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user