Fix dark mode crash

This commit is contained in:
pegasko 2025-01-06 04:19:03 +03:00
parent 8a9ad51d3b
commit 5bc78a1a30
5 changed files with 12 additions and 51 deletions

3
.gitignore vendored
View file

@ -47,3 +47,6 @@ captures/
hs_err_pid*
*.idea*
# Build metadata
output-metadata.json

View file

@ -10,8 +10,8 @@ android {
applicationId "art.pegasko.yeeemp"
minSdk 21
targetSdk 34
versionCode 1004
versionName "1.004"
versionCode 1005
versionName "1.005"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {

View file

@ -1,9 +0,0 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Yeeemp.Green" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
</style>
<!-- Base application theme. -->
<style name="Base.Theme.Yeeemp.Green" parent="Theme.Material3.DayNight.NoActionBar">
</style>
</resources>

View file

@ -1,17 +1,17 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.Yeeemp.Green" parent="Base.Theme.Yeeemp.Green">
<style name="Theme.Yeeemp.Green" parent="Theme.Yeeemp">
<item name="android:navigationBarColor">@color/pegasko_dark</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="android:windowLightStatusBar">false</item>
</style>
<style name="Theme.Yeeemp.Blue" parent="Base.Theme.Yeeemp.Blue">
<style name="Theme.Yeeemp.Blue" parent="Theme.Yeeemp">
<item name="android:navigationBarColor">@color/pegasko_dark</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="android:windowLightStatusBar">false</item>
</style>
<style name="Theme.Yeeemp.Red" parent="Base.Theme.Yeeemp.Red">
<style name="Theme.Yeeemp.Red" parent="Theme.Yeeemp">
<item name="android:navigationBarColor">@color/pegasko_dark</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="android:windowLightStatusBar">false</item>

View file

@ -1,24 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Yeeemp" parent="ThemeOverlay.MaterialComponents.Dark">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/pegasko_white</item>
<item name="colorPrimaryVariant">@color/pegasko_light</item>
<item name="colorOnPrimary">@color/pegasko_white</item>
<!-- Secondary brand color. -->
<item name="colorPrimary">@color/pegasko_white</item>
<item name="colorPrimaryVariant">@color/pegasko_light</item>
<item name="colorOnPrimary">@color/pegasko_white</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="statusBarBackground">@color/pegasko_dark</item>
<item name="statusBarForeground">@color/pegasko_dark</item>
</style>
<!-- Base application theme. -->
<style name="Base.Theme.Yeeemp" parent="Theme.Material3.Dark.NoActionBar">
<style name="Theme.Yeeemp" parent="Theme.Material3.Dark.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/pegasko_white</item>
<item name="colorPrimaryVariant">@color/pegasko_light</item>
@ -36,7 +18,7 @@
</style>
<!-- Green application theme. -->
<style name="Base.Theme.Yeeemp.Green" parent="Base.Theme.Yeeemp">
<style name="Theme.Yeeemp.Green" parent="Theme.Yeeemp">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/pegasko_green</item>
<item name="colorPrimaryVariant">@color/pegasko_dark_green</item>
@ -46,15 +28,10 @@
<item name="colorSecondary">@color/pegasko_green</item>
<item name="colorSecondaryVariant">@color/pegasko_dark_green</item>
<item name="colorOnSecondary">@color/pegasko_dark_green</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="statusBarBackground">@color/pegasko_dark</item>
<item name="statusBarForeground">@color/pegasko_dark</item>
</style>
<!-- Blue application theme. -->
<style name="Base.Theme.Yeeemp.Blue" parent="Base.Theme.Yeeemp">
<style name="Theme.Yeeemp.Blue" parent="Theme.Yeeemp">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/pegasko_blue</item>
<item name="colorPrimaryVariant">@color/pegasko_dark_blue</item>
@ -64,15 +41,10 @@
<item name="colorSecondary">@color/pegasko_blue</item>
<item name="colorSecondaryVariant">@color/pegasko_dark_blue</item>
<item name="colorOnSecondary">@color/pegasko_dark_blue</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="statusBarBackground">@color/pegasko_dark</item>
<item name="statusBarForeground">@color/pegasko_dark</item>
</style>
<!-- Red application theme. -->
<style name="Base.Theme.Yeeemp.Red" parent="Base.Theme.Yeeemp">
<style name="Theme.Yeeemp.Red" parent="Theme.Yeeemp">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/pegasko_red</item>
<item name="colorPrimaryVariant">@color/pegasko_dark_red</item>
@ -82,11 +54,6 @@
<item name="colorSecondary">@color/pegasko_red</item>
<item name="colorSecondaryVariant">@color/pegasko_dark_red</item>
<item name="colorOnSecondary">@color/pegasko_dark_red</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="statusBarBackground">@color/pegasko_dark</item>
<item name="statusBarForeground">@color/pegasko_dark</item>
</style>
</resources>