summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-01-30 13:59:25 -0800
committercretin45 <cretin45@gmail.com>2015-01-30 13:59:25 -0800
commit8ef130516cf6324f23e5e0ba522e419b6e2758f1 (patch)
tree62e1b9cb997ff02e122f12603b6de8df08294916 /src/com/cyanogenmod/setupwizard
parent1e23a8f80119726aa0bf0cb576e5c932db9c7e6c (diff)
downloadpackages_apps_SetupWizard-8ef130516cf6324f23e5e0ba522e419b6e2758f1.zip
packages_apps_SetupWizard-8ef130516cf6324f23e5e0ba522e419b6e2758f1.tar.gz
packages_apps_SetupWizard-8ef130516cf6324f23e5e0ba522e419b6e2758f1.tar.bz2
SetupWizard: Fix some navigation bar issues
Change-Id: Ifb75247001541a272dd00cdf129b2ea706a2a69e
Diffstat (limited to 'src/com/cyanogenmod/setupwizard')
-rw-r--r--src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
index 4f5ebe8..3c36328 100644
--- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
@@ -112,6 +112,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
@Override
protected void onResume() {
super.onResume();
+ updateSystemUI();
onPageTreeChanged();
}
@@ -162,6 +163,16 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
@Override
public void onPageLoaded(Page page) {
+ updateSystemUI();
+ updateButtonBar();
+ }
+
+ @Override
+ public void onPageTreeChanged() {
+ updateButtonBar();
+ }
+
+ private void updateSystemUI() {
if (getResources().getConfiguration().orientation
== Configuration.ORIENTATION_LANDSCAPE &&
mSetupData.isFirstPage()) {
@@ -171,12 +182,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
}
- updateButtonBar();
- }
-
- @Override
- public void onPageTreeChanged() {
- updateButtonBar();
}
private void updateButtonBar() {
@@ -189,6 +194,8 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
}
if (mSetupData.isFirstPage()) {
mPrevButton.setCompoundDrawables(null, null, null, null);
+ mPrevButton.setVisibility(SetupWizardUtils.hasTelephony(this) ?
+ View.VISIBLE : View.INVISIBLE);
} else {
mPrevButton.setCompoundDrawablesWithIntrinsicBounds(
getDrawable(R.drawable.ic_chevron_left_dark),
@@ -209,6 +216,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
mNextButton.setCompoundDrawablesWithIntrinsicBounds(null, null,
getDrawable(R.drawable.ic_chevron_right_dark), null);
mNextButton.setTextColor(resources.getColor(R.color.primary_text));
+ mPrevButton.setTextColor(resources.getColor(R.color.primary_text));
}
}