Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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 2 months ago
JSON representation

🎨 An Android library to create gradient animation like Instagram&Spotify

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


screenshot

## Usage
```kotlin
private lateinit var _spark: Spark

override 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
```xml

io.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.