Created
December 7, 2020 15:28
-
-
Save surajsau/5c6e74ec91aaf71b559b377c9d68604e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val items = listOf<Item>(..) | |
@Composable | |
fun Parallax(modifier: Modifier = Modifier) { | |
// [1] | |
val scrollState = rememberScrollState() | |
// [2] | |
ScrollableRow( | |
modifier = modifier, | |
scrollState = scrollState | |
) { | |
items.forEach { | |
ItemCard(item = it, scrollX = scrollState.value) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment