Fix theming
parent
cba4bfc823
commit
222db00efa
|
@ -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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue