Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Reverted old changes to the navigation bar to include the fix from Ca…
Browse files Browse the repository at this point in the history
…tima
  • Loading branch information
ziadOUA committed Oct 11, 2023
1 parent 970a959 commit 5a9aa03
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 89 deletions.
13 changes: 0 additions & 13 deletions app/src/main/java/com/ziadoua/zcard/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,6 @@ protected void onCreate(Bundle savedInstanceState) {
setSupportActionBar(binding.toolbar);
enableToolbarBackButton();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (getWindow().getInsetsController() != null) {
if (!Utils.isDarkModeEnabled(this)) {
getWindow().getInsetsController().setSystemBarsAppearance(WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS, WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS);
}

}
}

int colorBackground = MaterialColors.getColor(this, com.google.android.material.R.attr.colorSurface, ContextCompat.getColor(this, R.color.md_theme_light_surface));
getWindow().setNavigationBarColor(colorBackground);


TextView copyright = binding.creditsSub;
copyright.setText(content.getCopyrightShort());
TextView versionHistory = binding.versionHistorySub;
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/java/com/ziadoua/zcard/ImportExportActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,6 @@ protected void onCreate(Bundle savedInstanceState) {
setSupportActionBar(toolbar);
enableToolbarBackButton();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (getWindow().getInsetsController() != null) {
if (!Utils.isDarkModeEnabled(this)) {
getWindow().getInsetsController().setSystemBarsAppearance(WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS, WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS);
}

}
}

int colorBackground = MaterialColors.getColor(this, com.google.android.material.R.attr.colorSurface, ContextCompat.getColor(this, R.color.md_theme_light_surface));
getWindow().setNavigationBarColor(colorBackground);

Intent fileIntent = getIntent();
if (fileIntent != null && fileIntent.getType() != null) {
chooseImportType(false, fileIntent.getData());
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/java/com/ziadoua/zcard/LoyaltyCardEditActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,6 @@ protected void onCreate(Bundle savedInstanceState) {
setSupportActionBar(toolbar);
enableToolbarBackButton();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (getWindow().getInsetsController() != null) {
if (!Utils.isDarkModeEnabled(this)) {
getWindow().getInsetsController().setSystemBarsAppearance(WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS, WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS);
}

}
}

int colorBackground = MaterialColors.getColor(this, com.google.android.material.R.attr.colorSurface, ContextCompat.getColor(this, R.color.md_theme_light_surface));
getWindow().setNavigationBarColor(colorBackground);

mDatabase = new DBHelper(this).getWritableDatabase();

extractIntentFields(getIntent());
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/java/com/ziadoua/zcard/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,6 @@ protected void onCreate(Bundle inputSavedInstanceState) {
groupsTabLayout = binding.groups;
contentMainBinding = ContentMainBinding.bind(binding.include.getRoot());

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (getWindow().getInsetsController() != null) {
if (!Utils.isDarkModeEnabled(this)) {
getWindow().getInsetsController().setSystemBarsAppearance(WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS, WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS);
}

}
}

int colorBackground = MaterialColors.getColor(this, com.google.android.material.R.attr.colorSurface, ContextCompat.getColor(this, R.color.md_theme_light_surface));
getWindow().setNavigationBarColor(colorBackground);

mDatabase = new DBHelper(this).getWritableDatabase();

mUpdateLoyaltyCardListRunnable = () -> {
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/java/com/ziadoua/zcard/ManageGroupActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ protected void onCreate(Bundle inputSavedInstanceState) {
Toolbar toolbar = binding.toolbar;
setSupportActionBar(toolbar);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (getWindow().getInsetsController() != null) {
if (!Utils.isDarkModeEnabled(this)) {
getWindow().getInsetsController().setSystemBarsAppearance(WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS, WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS);
}

}
}

int colorBackground = MaterialColors.getColor(this, com.google.android.material.R.attr.colorSurface, ContextCompat.getColor(this, R.color.md_theme_light_surface));
getWindow().setNavigationBarColor(colorBackground);

mDatabase = new DBHelper(this).getWritableDatabase();

noGroupCardsText = binding.include.noGroupCardsText;
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/java/com/ziadoua/zcard/ManageGroupsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ protected void onCreate(Bundle savedInstanceState) {
setSupportActionBar(toolbar);
enableToolbarBackButton();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (getWindow().getInsetsController() != null) {
if (!Utils.isDarkModeEnabled(this)) {
getWindow().getInsetsController().setSystemBarsAppearance(WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS, WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS);
}

}
}

int colorBackground = MaterialColors.getColor(this, com.google.android.material.R.attr.colorSurface, ContextCompat.getColor(this, R.color.md_theme_light_surface));
getWindow().setNavigationBarColor(colorBackground);

mDatabase = new DBHelper(this).getWritableDatabase();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ protected void onCreate(Bundle savedInstanceState) {
setSupportActionBar(toolbar);
enableToolbarBackButton();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (getWindow().getInsetsController() != null) {
if (!Utils.isDarkModeEnabled(this)) {
getWindow().getInsetsController().setSystemBarsAppearance(WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS, WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS);
}

}
}

int colorBackground = MaterialColors.getColor(this, com.google.android.material.R.attr.colorSurface, ContextCompat.getColor(this, R.color.md_theme_light_surface));
getWindow().setNavigationBarColor(colorBackground);

// Display the fragment as the main content.
fragment = new SettingsFragment();
getSupportFragmentManager().beginTransaction()
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

<item name="windowActionModeOverlay">true</item>
<item name="popupMenuBackground">@drawable/rounded</item>

<item name="android:navigationBarColor">@android:color/transparent</item>
</style>

<style name="ThemeOverlay.App.MaterialAlertDialog.Monet" parent="ThemeOverlay.Material3.MaterialAlertDialog">
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

<item name="windowActionModeOverlay">true</item>
<item name="popupMenuBackground">@drawable/rounded</item>

<item name="android:navigationBarColor">@android:color/transparent</item>
</style>

<style name="ThemeOverlay.App.MaterialAlertDialog.Monet" parent="ThemeOverlay.Material3.MaterialAlertDialog">
Expand Down

0 comments on commit 5a9aa03

Please sign in to comment.