From 741d97a5042e40f8184215661aa348d221a83ece Mon Sep 17 00:00:00 2001 From: bustonovao Date: Tue, 21 Nov 2023 00:44:07 +0400 Subject: [PATCH] Initial project stock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Алишер Бустонов --- app/build.gradle.kts | 4 ++-- app/src/main/java/com/alisher/stock/ui/theme/Theme.kt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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) }