🚀 Looking for an easy way to play GIF animations in your Jetpack Compose projects?
With gifanim, you have full control over your animations! 🧙♂️
🔄 Play and Pause: Start or stop the animation anytime you want!
♾️ Loop Count: Play the animation with limited or infinite looping.
🌈 Full Customization: Customize scale and much more!
1️⃣ Add Dependencies
Add the following to the 'dependencyResolutionManagement' section in your 'settings.gradle' file:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Then, include this in the dependencies section of your 'build.gradle' file:
dependencies {
implementation("com.github.turkmenugur:gifanim:1.0.0")
}
GifPlayer(
gifResId = R.drawable.loading_animation,
)
GifPlayer(
gifResId = R.drawable.loading_animation,
modifier = Modifier.padding(16.dp),
loopCount = 3,
onStart = {
Toast.makeText(context, "Animation started", Toast.LENGTH_SHORT).show()
},
onStop = {
Toast.makeText(context, "Animation is over!", Toast.LENGTH_SHORT).show()
},
width = 200,
height = 200
)
💡 Simple and user-friendly usage
⚡ Fast and highly performant
🔧 Flexible structure
🎨 Perfect compatibility with Jetpack Compose