Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ValeryPonomarenko/compose-shimmer
Add a shimmer effect to the layout in Android Compose
https://github.com/ValeryPonomarenko/compose-shimmer
android android-compose compose jetpack-compose shimmer shimmer-android
Last synced: 4 months ago
JSON representation
Add a shimmer effect to the layout in Android Compose
- Host: GitHub
- URL: https://github.com/ValeryPonomarenko/compose-shimmer
- Owner: ValeryPonomarenko
- Created: 2021-08-26T12:51:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-31T12:37:05.000Z (over 1 year ago)
- Last Synced: 2023-07-31T14:55:09.460Z (over 1 year ago)
- Topics: android, android-compose, compose, jetpack-compose, shimmer, shimmer-android
- Language: Kotlin
- Homepage:
- Size: 1.26 MB
- Stars: 77
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jetpack-compose-awesome - shimmer - Shimmer effect (Libraries / UI)
README
# Shimmer
[![Release](https://jitpack.io/v/me.vponomarenko/compose-shimmer.svg)](https://jitpack.io/#me.vponomarenko/compose-shimmer)Library provides an easy way to a add shimmer effect in Android Compose project.
# Installing
To download it from the jitpack, add these lines in your root build.gradle at the end of repositories:```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```And then add to the module's build.gradle
```gradle
implementation "me.vponomarenko:compose-shimmer:LATEST_VERSION"
```LATEST_VERSION is **1.0.0**
# How to use
To add a shimmer effect to the layout, just use the `.shimmer()` modifier
```Kotlin
Column(
modifier = Modifier
.fillMaxSize()
.shimmer()
) {
Box(
modifier = Modifier
.fillMaxWidth()
.height(120.dp)
.background(
color = Color(0xFFF3F3F3),
shape = RoundedCornerShape(4.dp)
)
)
}
```