SetupWizard: Fix some navigation bar issues
Change-Id: Ifb75247001541a272dd00cdf129b2ea706a2a69e
This commit is contained in:
parent
1e23a8f801
commit
8ef130516c
@ -112,6 +112,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
updateSystemUI();
|
||||||
onPageTreeChanged();
|
onPageTreeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,6 +163,16 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageLoaded(Page page) {
|
public void onPageLoaded(Page page) {
|
||||||
|
updateSystemUI();
|
||||||
|
updateButtonBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageTreeChanged() {
|
||||||
|
updateButtonBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateSystemUI() {
|
||||||
if (getResources().getConfiguration().orientation
|
if (getResources().getConfiguration().orientation
|
||||||
== Configuration.ORIENTATION_LANDSCAPE &&
|
== Configuration.ORIENTATION_LANDSCAPE &&
|
||||||
mSetupData.isFirstPage()) {
|
mSetupData.isFirstPage()) {
|
||||||
@ -171,12 +182,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
|||||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE
|
||||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
|
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
|
||||||
}
|
}
|
||||||
updateButtonBar();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPageTreeChanged() {
|
|
||||||
updateButtonBar();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateButtonBar() {
|
private void updateButtonBar() {
|
||||||
@ -189,6 +194,8 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
|||||||
}
|
}
|
||||||
if (mSetupData.isFirstPage()) {
|
if (mSetupData.isFirstPage()) {
|
||||||
mPrevButton.setCompoundDrawables(null, null, null, null);
|
mPrevButton.setCompoundDrawables(null, null, null, null);
|
||||||
|
mPrevButton.setVisibility(SetupWizardUtils.hasTelephony(this) ?
|
||||||
|
View.VISIBLE : View.INVISIBLE);
|
||||||
} else {
|
} else {
|
||||||
mPrevButton.setCompoundDrawablesWithIntrinsicBounds(
|
mPrevButton.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
getDrawable(R.drawable.ic_chevron_left_dark),
|
getDrawable(R.drawable.ic_chevron_left_dark),
|
||||||
@ -209,6 +216,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
|
|||||||
mNextButton.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
mNextButton.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
||||||
getDrawable(R.drawable.ic_chevron_right_dark), null);
|
getDrawable(R.drawable.ic_chevron_right_dark), null);
|
||||||
mNextButton.setTextColor(resources.getColor(R.color.primary_text));
|
mNextButton.setTextColor(resources.getColor(R.color.primary_text));
|
||||||
|
mPrevButton.setTextColor(resources.getColor(R.color.primary_text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user