Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonnyl/spark
🎨 An Android library to create gradient animation like Instagram&Spotify
https://github.com/tonnyl/spark
android android-library animation gradient gradient-animation instagram kotlin spotify
Last synced: about 3 hours ago
JSON representation
🎨 An Android library to create gradient animation like Instagram&Spotify
- Host: GitHub
- URL: https://github.com/tonnyl/spark
- Owner: TonnyL
- License: mit
- Created: 2017-08-26T11:46:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-18T16:30:09.000Z (over 5 years ago)
- Last Synced: 2024-10-27T06:38:58.564Z (12 days ago)
- Topics: android, android-library, animation, gradient, gradient-animation, instagram, kotlin, spotify
- Language: Kotlin
- Homepage:
- Size: 4.46 MB
- Stars: 671
- Watchers: 14
- Forks: 49
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spark
[![Build Status](https://travis-ci.org/TonnyL/Spark.svg?branch=master)](https://travis-ci.org/TonnyL/Spark)
[![Download](https://api.bintray.com/packages/tonnyl/maven/spark/images/download.svg) ](https://bintray.com/tonnyl/maven/spark/_latestVersion)Create gradient animations like Instagram&Spotify.
# Screenshots
## Usage
```kotlin
private lateinit var _spark: Sparkoverride fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)_spark = Spark(frameLayout, Spark.ANIM_GREEN_PURPLE, 4000)
_spark.startAnimation()
}override fun onDestroy() {
super.onDestroy()_spark.stopAnimation()
}
```## Installation
### Gradle
```gradle
dependencies {
implementation 'io.github.tonnyl:spark:x.y.z'
}
```### Maven
```xmlio.github.tonnyl
spark
x.y.z
pom```
## Custom Gradient Colors
Spark has 3 built-in animation-lists, and you can custom your owns.### Create gradient drawables
`purple_drawable.xml````xml
```
`yellow_drawable.xml`
```xml
```
### Create the Animation List
`custom_anim_list.xml````xml
```
### Apply Your Custom Animation List
```kotlin
_spark = Spark(
frameLayout,
R.drawable.your_custom_anim_list, // Your custom animation
4000
)
```## Thanks
Designed by [Alexander Zaytsev](https://dribbble.com/anwaltzzz).
![Sketch Gradients](./art/Sketch_Gradients.png)
## License
Spark is under the MIT license. See the [LICENSE](LICENSE) for more information.