Skip to content

turkmenugur/gifanim

Repository files navigation

🎥 gifanim - A Powerful GIF Playback Library for Jetpack Compose 🎨✨

🚀 Looking for an easy way to play GIF animations in your Jetpack Compose projects?

With gifanim, you have full control over your animations!  🧙‍♂️

🌟 Features

 🔄 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!

📦 Installation

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")
}

🚀 How to Use?

1️⃣ Simple GIF Playback

GifPlayer(
    gifResId = R.drawable.loading_animation,
)

2️⃣ Advanced Customization

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
)

gifanim usage

🤔 Why Gifanim?

💡 Simple and user-friendly usage  

⚡ Fast and highly performant  

🔧 Flexible structure  

🎨 Perfect compatibility with Jetpack Compose

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages