Skip to content

dev-labs-bg/twinkle

Repository files navigation

logo

Twinkle ✨

Twinkle is a Kotlin library which makes any View in your Android app twinkle.

This library creates ImageViews and animates them generating a sparkle effect.

Original iOS version here.

Download Twitter URL

Usage

The sample project provides an example of how to integrate Twinkle, otherwise you can follow this example.

text_view.twinkle()

For more control.

val t = twinkle_text.twinkle()
t.stop()

The library includes several optional arguments.

text_view.twinkle(drawableRes = R.drawable.image, duration = 1200, sparsity = 200, size = 120)

Since the library generates ImageView objects, if you run it on multiple views, with high speed/duration you might notice a bit of lag. That's normal, due to the expensive generation of the image views.


Download

Gradle

dependencies {
  compile 'bg.devlabs.twinkle:twinkle:<latest_version>'
}

Maven

<dependency>
  <groupId>bg.devlabs.twinkle</groupId>
  <artifactId>twinkle</artifactId>
  <version>latest_version</version>
  <type>pom</type>
</dependency>

Manually

You can also manually download the library class and use it in your application.


Compatibility

Minimum Android SDK: API level 19


Author

Radoslav Yankov @Radoslav_Y


Getting help

If you spot a problem you can open an issue on the Github page, or alternatively, you can tweet us at @devlabsbg


License

Transitioner is released under the MIT License.