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.
- Host: GitHub
- URL: https://github.com/khan-mujeeb/button-morphing-animation
- Owner: khan-mujeeb
- Created: 2023-07-04T18:12:30.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-05T18:26:19.000Z (almost 3 years ago)
- Last Synced: 2025-04-05T07:42:07.468Z (about 1 year ago)
- Topics: animated-button, morphing-animations, morphing-button, xml
- Language: Kotlin
- Homepage:
- Size: 111 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)!!
```