A Jetpack Compose library to achieve staggered grid view
To start using this package, add the JitPack repository to your settings.gradle
file
maven { url 'https://jitpack.io' }
Then add the dependency
implementation 'com.github.nesyou01:LazyStaggeredGrid:<latest-version>'
- Scroll animations
- Light weight
- Lazy implemtation
LazyStaggeredGrid(cells = StaggeredCells.Adaptive(minSize = 180.dp)) {
items(60) {
val random: Double = 100 Math.random() * (500 - 100)
Image(
painter = painterResource(id = R.drawable.image),
contentDescription = null,
modifier = Modifier.height(random.dp).padding(10.dp),
contentScale = ContentScale.Crop
)
}
}
The result of the code above:
Please file any issues, bugs or feature request as an issue on our GitHub page.