Skip to content

Commit

Permalink
fix #4211: removed setting the nav bar colors since the default andro…
Browse files Browse the repository at this point in the history
…id colors were better than the ones we set + they were leading to usability issues too.
  • Loading branch information
VishnuSanal committed Oct 15, 2024
1 parent f2eed33 commit 047bf76
Showing 1 changed file with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,36 +141,6 @@ public void initStatusBarResources(View parentView) {
}
if (getBoolean(PREFERENCE_COLORED_NAVIGATION)) {
window.setNavigationBarColor(PreferenceUtils.getStatusColor(getPrimary()));
} else {
if (getAppTheme().equals(AppTheme.LIGHT)) {
// do nothing: since the default android colors were better than the ones we set.
// setting white led to usability issues too. ref: #4211
} else {

if (SDK_INT >= Build.VERSION_CODES.R) {
WindowInsetsController windowInsetController = getWindow().getInsetsController();
if (windowInsetController != null)
windowInsetController.setSystemBarsAppearance(
WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS,
WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS);

if (getAppTheme().equals(AppTheme.BLACK)) {
getWindow().setNavigationBarColor(Utils.getColor(this, android.R.color.black));
} else {
getWindow().setNavigationBarColor(Utils.getColor(this, R.color.holo_dark_background));
}

} else if (SDK_INT >= Build.VERSION_CODES.O) {
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);

if (getAppTheme().equals(AppTheme.BLACK)) {
getWindow().setNavigationBarColor(Utils.getColor(this, android.R.color.black));
} else {
getWindow().setNavigationBarColor(Utils.getColor(this, R.color.holo_dark_background));
}
}

}
}
} else if (SDK_INT == Build.VERSION_CODES.KITKAT_WATCH
|| SDK_INT == Build.VERSION_CODES.KITKAT) {
Expand Down

0 comments on commit 047bf76

Please sign in to comment.