Skip to content

Commit

Permalink
Fix invalid status bar colour theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mvmike committed Nov 11, 2024
1 parent 9007dec commit 38cb6ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class ConfigurationActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(
when (applicationContext.isDarkThemeEnabled()) {
true -> androidx.appcompat.R.style.Theme_AppCompat
else -> androidx.appcompat.R.style.Theme_AppCompat_DayNight
true -> R.style.Theme_AppCompat_DarkTheme
else -> R.style.Theme_AppCompat_LightTheme
}
)

Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<resources>

<style name="Theme.AppCompat_LightTheme" parent="@style/Theme.AppCompat.DayNight">
<item name="android:windowLightStatusBar">true</item>
</style>

<style name="Theme.AppCompat_DarkTheme" parent="@style/Theme.AppCompat">
<item name="android:windowLightStatusBar">false</item>
</style>

</resources>

0 comments on commit 38cb6ba

Please sign in to comment.