2

I have an Android app and it is currently in MVP state some of the users use their phone in Dark mode. There is no time to optimize for Dark theme.

I already tried passing same light theme colors to the Material theme does not work.

Also tried this but didn't work,

AppTheme(false) {
  content()
}

because theme composable says,

fun AppTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable() () -> Unit) {
}

nayan dhabarde
  • 1,734
  • 1
  • 19
  • 38
  • 1
    You only disabled it in the Compose part, but you also need to do it in the Android part (which is at a lower level than Compose), for example, see [this answer](https://stackoverflow.com/questions/57175226/). – Phil Dukhov Mar 20 '22 at 04:19

1 Answers1

1

Thanks Philip Dukhov for reference, basically need to use a descendant of

Theme.MaterialComponents.Light

in themes.xml

nayan dhabarde
  • 1,734
  • 1
  • 19
  • 38