Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nesyou01/LazyStaggeredGrid
A Jetpack Compose library to achieve staggered grid view
https://github.com/nesyou01/LazyStaggeredGrid
android jetpack jetpack-android jetpack-compose kotlin kotlin-android
Last synced: about 2 months ago
JSON representation
A Jetpack Compose library to achieve staggered grid view
- Host: GitHub
- URL: https://github.com/nesyou01/LazyStaggeredGrid
- Owner: nesyou01
- Created: 2022-01-24T22:13:04.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-25T14:18:17.000Z (over 2 years ago)
- Last Synced: 2024-06-28T03:37:54.595Z (6 months ago)
- Topics: android, jetpack, jetpack-android, jetpack-compose, kotlin, kotlin-android
- Language: Kotlin
- Homepage:
- Size: 760 KB
- Stars: 51
- Watchers: 2
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LazyStaggeredGrid
A Jetpack Compose library to achieve staggered grid view
## Getting Started
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:'
```## Features
- Scroll animations
- Light weight
- Lazy implemtation## Simple Example
```kotlin
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
)
}
}
```## Result
The result of the code above:## Issues
Please file any issues, bugs or feature request as an [issue](https://github.com/nesyou01/LazyStaggeredGrid/issues) on our GitHub page.
## Buy me a coffe
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/nesyou)