这是indexloc提供的服务,不要输入任何密码
Skip to content

Version bump composables #16

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

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions libraryVersion.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
treenav_version=0.0.10
strings_version=0.0.10
compose_version=0.0.10
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Loading