Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetpack Compose Theme Build problem #343

Open
SURIart opened this issue Aug 21, 2024 · 0 comments
Open

Jetpack Compose Theme Build problem #343

SURIart opened this issue Aug 21, 2024 · 0 comments

Comments

@SURIart
Copy link

SURIart commented Aug 21, 2024

The problem is the new color theme updated from material Theme builder doesn't make changes to the app.
the issue lie in theme building function ->

fun AppTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
// Dynamic color is available on Android 12+
dynamicColor: Boolean = true,
content: @composable () -> Unit
) {
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
}

    darkTheme -> darkScheme
    else -> lightScheme
}

due to the darkTheme and dynamicColor the changes made in theme color doesn't apply to the app

if the darktheme and dynamic color is made false the applied colors comes

but since the functionality is quite important in some apps
it would nice if u rectify this issue

Screenshot 2024-08-21 222815
see the above the set colors are different from the app colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant