An open API service indexing awesome lists of open source software.

https://github.com/khan-mujeeb/button-morphing-animation

Enhance your user interfaces with dynamic morphing button animations in just a few lines of code.
https://github.com/khan-mujeeb/button-morphing-animation

animated-button morphing-animations morphing-button xml

Last synced: 11 months ago
JSON representation

Enhance your user interfaces with dynamic morphing button animations in just a few lines of code.

Awesome Lists containing this project

README

          

# Button-Morphing-Animation

🌟 Enhance your user interfaces with dynamic morphing button animations in just a few lines of code.



## Including in your project

**Step 1.** Add the JitPack repository to your root build.gradle at the end of repositories
```kotlin
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```

**Step 2.** Add the dependency below to your module's build.gradle file
```kotlin
dependencies {
implementation 'com.github.khan-mujeeb:Button-Morphing-Animation:1.0.2'
}
```

## Usage
**Step 1.** Add the following code to your xml layout
```xml

```

**Step 2.** Add this code to your respective kt file
```kotlin
binding.btn2.text = "Let's get Started"

binding.btn2.setOnClickListener {
binding.btn2. setUIState(MorphButton.UIState.Loading)
}
```

## Customizations
```kotlin
binding.btn.toBgColor = getColor(R.color.sea_green)
binding.btn.fromBgColor = getColor(R.color.white)
binding.btn.toTextColor = getColor(R.color.white)
binding.btn.fromTextColor = getColor(R.color.black)
binding.btn.iconDrawable = getDrawable(R.drawable.browser_new)!!
```