Fix theming

pull/653/merge
Varun Patil 2023-10-03 11:52:15 -07:00
parent cba4bfc823
commit 222db00efa
2 changed files with 2 additions and 3 deletions

View File

@ -303,8 +303,7 @@ class MainActivity : AppCompatActivity() {
fun applyTheme(color: String?, isDark: Boolean) { fun applyTheme(color: String?, isDark: Boolean) {
if (color == null) return if (color == null) return
// Set dark mode // Set system bars
setTheme(if (isDark) android.R.style.Theme_Black else android.R.style.Theme_Light)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val appearance = val appearance =
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS or WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS or WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS

View File

@ -1,6 +1,6 @@
<resources> <resources>
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.Memories" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.Memories" parent="Theme.MaterialComponents.Light.NoActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/theme</item> <item name="colorPrimary">@color/theme</item>
<item name="colorPrimaryVariant">@color/theme</item> <item name="colorPrimaryVariant">@color/theme</item>