Skip to content

Instantly share code, notes, and snippets.

@skydoves
Created August 12, 2022 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skydoves/6201941bf50c8f3a62572eb7c1ed68bb to your computer and use it in GitHub Desktop.
Save skydoves/6201941bf50c8f3a62572eb7c1ed68bb to your computer and use it in GitHub Desktop.
sliding_composable2
@Composable
fun SlidingComposable(scrollPositionProvider: () -> Int) {
Card(
modifier = Modifier.offset {
IntOffset(x = scrollPositionProvider(), 0)
},
backgroundColor = Color.Cyan
) {
Text(
text = "Hello I slide out"
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment