diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4371305..2a908f1 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -51,9 +51,9 @@ android { dependencies { - implementation("androidx.core:core-ktx:1.12.0") + implementation("androidx.core:core-ktx:1.9.0") implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2") - implementation("androidx.activity:activity-compose:1.8.1") + implementation("androidx.activity:activity-compose:1.8.0") implementation(platform("androidx.compose:compose-bom:2023.03.00")) implementation("androidx.compose.ui:ui") implementation("androidx.compose.ui:ui-graphics") diff --git a/app/src/main/java/com/alisher/stock/ui/theme/Theme.kt b/app/src/main/java/com/alisher/stock/ui/theme/Theme.kt index a29b1a8..eb60f1d 100644 --- a/app/src/main/java/com/alisher/stock/ui/theme/Theme.kt +++ b/app/src/main/java/com/alisher/stock/ui/theme/Theme.kt @@ -1,6 +1,7 @@ package com.alisher.stock.ui.theme import android.app.Activity +import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme import androidx.compose.material3.darkColorScheme @@ -44,7 +45,7 @@ fun StockTheme( content: @Composable () -> Unit ) { val colorScheme = when { - dynamicColor && true -> { + dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { val context = LocalContext.current if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) }