Skip to content

Commit

Permalink
Fix splash screen background color in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
SIKV committed Dec 6, 2023
1 parent 800f92f commit 1dbfafd
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 1 deletion.
1 change: 1 addition & 0 deletions uhabits-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ dependencies {
implementation("androidx.legacy:legacy-preference-v14:1.0.0")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("com.google.android.material:material:1.10.0")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation("com.opencsv:opencsv:5.9")
implementation(project(":uhabits-core"))
kapt("com.google.dagger:dagger-compiler:$daggerVersion")
Expand Down
23 changes: 23 additions & 0 deletions uhabits-android/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016-2021 Álinson Santos Xavier <[email protected]>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Loop Habit Tracker is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<resources>
<color name="splash_screen_background">@color/grey_900</color>
</resources>
24 changes: 24 additions & 0 deletions uhabits-android/src/main/res/values-v31/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
~ Copyright (C) 2016-2021 Álinson Santos Xavier <[email protected]>
~
~ This file is part of Loop Habit Tracker.
~
~ Loop Habit Tracker is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by the
~ Free Software Foundation, either version 3 of the License, or (at your
~ option) any later version.
~
~ Loop Habit Tracker is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<resources>
<style name="AppBaseTheme" parent="@style/AppTheme">
<item name="android:windowSplashScreenBackground">@color/splash_screen_background</item>
</style>
</resources>
1 change: 1 addition & 0 deletions uhabits-android/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@
</array>

<color name="ic_launcher_background">#1976D2</color>
<color name="splash_screen_background">@color/grey_200</color>
</resources>
6 changes: 5 additions & 1 deletion uhabits-android/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-->

<resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppBaseTheme" parent="@style/Theme.MaterialComponents.Light.NoActionBar">
<style name="AppTheme" parent="@style/Theme.MaterialComponents.Light.NoActionBar">
<item name="aboutScreenColor">@color/blue_800</item>
<item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
<item name="actionModeBackground">@color/grey_700</item>
Expand Down Expand Up @@ -66,6 +66,10 @@
<item name="dialogFormLabelColor">@color/white</item>
</style>

<style name="AppBaseTheme" parent="@style/AppTheme">
<item name="windowSplashScreenBackground">@color/splash_screen_background</item>
</style>

<style name="AppBaseThemeDark" parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<item name="aboutScreenColor">@color/blue_300</item>
<item name="actionModeBackground">@color/grey_800</item>
Expand Down

0 comments on commit 1dbfafd

Please sign in to comment.