How to disable Darktheme when using Jetpack compose in Android app?

Viewed 702

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) {
}

1 Answers

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

Theme.MaterialComponents.Light

in themes.xml

Related