diff --git a/androidApp/src/main/java/dev/xinto/argos/ui/component/TabPager.kt b/androidApp/src/main/java/dev/xinto/argos/ui/component/TabPager.kt index 96e8d57..26d750a 100644 --- a/androidApp/src/main/java/dev/xinto/argos/ui/component/TabPager.kt +++ b/androidApp/src/main/java/dev/xinto/argos/ui/component/TabPager.kt @@ -8,11 +8,10 @@ import androidx.compose.foundation.pager.rememberPagerState import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.material3.PrimaryScrollableTabRow -import androidx.compose.material3.PrimaryTabRow import androidx.compose.material3.SecondaryScrollableTabRow -import androidx.compose.material3.SecondaryTabRow import androidx.compose.material3.Tab import androidx.compose.material3.TabPosition +import androidx.compose.material3.TabRow import androidx.compose.material3.TabRowDefaults import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -76,7 +75,7 @@ class TabPagerScopeImpl : TabPagerScope { } -@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterial3Api::class) +@OptIn(ExperimentalFoundationApi::class) @Composable fun PrimaryTabPager( selectedIndex: Int, @@ -88,13 +87,15 @@ fun PrimaryTabPager( onIndexSelect = onIndexSelect, modifier = modifier, tabRow = { pager, tabs -> - PrimaryTabRow( + TabRow( selectedTabIndex = selectedIndex, indicator = { TabRowDefaults.PrimaryIndicator( modifier = Modifier.pagerTabIndicatorOffset(pager, it) ) }, + containerColor = TabRowDefaults.primaryContainerColor, + contentColor = TabRowDefaults.primaryContentColor, tabs = tabs ) }, @@ -127,7 +128,7 @@ fun PrimaryScrollableTabPager( ) @Composable -@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class) +@OptIn(ExperimentalFoundationApi::class) fun SecondaryTabPager( selectedIndex: Int, onIndexSelect: (Int) -> Unit, @@ -138,13 +139,15 @@ fun SecondaryTabPager( onIndexSelect = onIndexSelect, modifier = modifier, tabRow = { pager, tabs -> - SecondaryTabRow( + TabRow( selectedTabIndex = selectedIndex, indicator = { TabRowDefaults.SecondaryIndicator( modifier = Modifier.pagerTabIndicatorOffset(pager, it) ) }, + containerColor = TabRowDefaults.secondaryContainerColor, + contentColor = TabRowDefaults.secondaryContentColor, tabs = tabs ) }, diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a3999af..774c877 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,15 +1,15 @@ [versions] agp = "8.2.0" -kotlin = "1.9.20" +kotlin = "1.9.21" compose = "1.5.4" -compose-compiler = "1.5.4" +compose-compiler = "1.5.7" ktor = "2.3.6" coil = "2.5.0" paging = "3.3.0-alpha02-0.4.0" [libraries] androidx-core = { group = "androidx.core", name = "core-ktx", version = "1.12.0"} -androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.8.1" } +androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.8.2" } androidx-browser = { module = "androidx.browser:browser", version = "1.7.0" } androidx-crypto = { group = "androidx.security", name = "security-crypto", version = "1.1.0-alpha06" } androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version = "2.6.2" } @@ -24,7 +24,7 @@ compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" } compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" } compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" } compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" } -compose-material3 = { module = "androidx.compose.material3:material3", version = "1.2.0-alpha11" } +compose-material3 = { module = "androidx.compose.material3:material3", version = "1.2.0-beta01" } kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version = "0.4.1" }