From a60ce42dc7f26ddf178a0b7a80a2831852af6261 Mon Sep 17 00:00:00 2001 From: Adetunji Dahunsi Date: Sat, 2 Nov 2024 16:09:48 -0400 Subject: [PATCH] Version bump composables --- gradle/libs.versions.toml | 2 +- libraryVersion.properties | 6 +++--- .../kotlin/com/tunjid/demo/common/ui/DemoApp.kt | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5b407d9..5c81a3b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -21,7 +21,7 @@ kotlinxCoroutines = "1.9.0" kotlinxDatetime = "0.6.1" lifecycle-runtime = "2.8.6" tunjidStateHolder = "1.1.0" -tunjidComposables = "0.0.7" +tunjidComposables = "0.0.9" junit = "4.13.2" runner = "1.0.2" espressoCore = "3.0.2" diff --git a/libraryVersion.properties b/libraryVersion.properties index 1a55704..aa48e0f 100644 --- a/libraryVersion.properties +++ b/libraryVersion.properties @@ -14,6 +14,6 @@ # limitations under the License. # groupId=com.tunjid.treenav -treenav_version=0.0.9 -strings_version=0.0.9 -compose_version=0.0.9 \ No newline at end of file +treenav_version=0.0.10 +strings_version=0.0.10 +compose_version=0.0.10 \ No newline at end of file diff --git a/sample/common/src/commonMain/kotlin/com/tunjid/demo/common/ui/DemoApp.kt b/sample/common/src/commonMain/kotlin/com/tunjid/demo/common/ui/DemoApp.kt index 6cce4f5..4337a12 100644 --- a/sample/common/src/commonMain/kotlin/com/tunjid/demo/common/ui/DemoApp.kt +++ b/sample/common/src/commonMain/kotlin/com/tunjid/demo/common/ui/DemoApp.kt @@ -23,6 +23,7 @@ import androidx.compose.animation.core.animate import androidx.compose.animation.core.animateDpAsState import androidx.compose.animation.core.tween import androidx.compose.foundation.background +import androidx.compose.foundation.border import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.gestures.draggable import androidx.compose.foundation.gestures.rememberDraggableState @@ -60,6 +61,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.Dp @@ -125,6 +127,10 @@ fun SampleApp( SplitLayoutState( orientation = Orientation.Horizontal, maxCount = order.size, + keyAtIndex = { index -> + val indexDiff = order.size - visibleCount + order[index + indexDiff] + } ) } val surfaceColor = MaterialTheme.colorScheme.surfaceColorAtElevation( @@ -158,6 +164,14 @@ fun SampleApp( ) .background(surfaceColor, RoundedCornerShape(16.dp)) else Modifier + .border(16.dp, when(paneState.pane) { + ThreePane.Primary -> Color.Cyan + ThreePane.TransientPrimary -> Color.Transparent + ThreePane.Secondary -> Color.Magenta + ThreePane.Tertiary -> Color.Yellow + ThreePane.Overlay -> Color.Transparent + null -> Color.Transparent + }) .fillMaxSize() } .threePanedNavHostConfiguration(