Shimmer loading animation for android views.
- Clone this repository.
git clone https://github.com/UdaraWanasinghe/android-shimmer-layout
- Run
gradle
taskpublishToMavenLocal
.sh gradlew publishToMavenLocal
- Add the
mavenLocal
repository to your project.// settings.gradle.kts dependencyResolutionManagement { repositories { mavenLocal() } }
- Import the library to your project.
// module level build.gradle.kts dependencies { implementation("com.aureusapps.android:shimmer-layout:1.0.0") }
- Wrap your views with
ShimmerLayout
.<com.aureusapps.android.shimmerlayout.ShimmerLayout android:layout_width="wrap_content" android:layout_height="wrap_content" app:shimmerEnabled="true" app:shimmerBaseColor="@color/teal_200" app:shimmerHighlightColor="@color/purple_500" app:shimmerGradientStart="0.33" app:shimmerGradientEnd="0.66" app:shimmerTilt="0.9" app:shimmerXfermode="src_in"> <TextView style="@style/TextAppearance.MaterialComponents.Headline3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" android:textColor="@color/black" /> </com.aureusapps.android.shimmerlayout.ShimmerLayout>