-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52fd815
commit 1af6168
Showing
1 changed file
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,80 @@ | ||
# twinkle | ||
Twinkle Android view elements in Kotlin | ||
![logo](https://raw.githubusercontent.com/dev-labs-bg/twinkle/master/preview.gif) | ||
|
||
|
||
|
||
`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](https://github.com/piemonte/Twinkle). | ||
|
||
[![Download](https://img.shields.io/badge/download-1.0-6db33f.svg?style=flat-square&label=version)](https://jitpack.io/#dev-labs-bg/twinkle) [![Twitter URL](https://img.shields.io/badge/twitter-%40devlabsbg-1DA1F2.svg?style=flat-square&logo=twitter)](http://twitter.com/devlabsbg) | ||
|
||
|
||
## Usage | ||
|
||
The sample project provides an example of how to integrate Twinkle, otherwise you can follow this example. | ||
|
||
```kotlin | ||
text_view.twinkle() | ||
|
||
``` | ||
|
||
For more control. | ||
```kotlin | ||
val t = twinkle_text.twinkle() | ||
t.stop() | ||
``` | ||
|
||
|
||
The library includes several optional arguments. | ||
```kotlin | ||
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 | ||
|
||
```gradle | ||
dependencies { | ||
compile 'bg.devlabs.twinkle:twinkle:<latest_version>' | ||
} | ||
``` | ||
|
||
### Maven | ||
```xml | ||
<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](https://github.com/dev-labs-bg/twinkle/blob/master/twinkle/src/main/java/bg/devlabs/twinkle/Twinkle.kt) and use it in your application. | ||
|
||
--- | ||
## Compatibility | ||
|
||
Minimum Android SDK: API level 19 | ||
|
||
--- | ||
## Author | ||
|
||
Radoslav Yankov [@Radoslav_Y](https://twitter.com/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](https://twitter.com/devlabsbg) | ||
|
||
--- | ||
## License | ||
|
||
Transitioner is released under the [MIT License](https://github.com/dev-labs-bg/twinkle/blob/master/LICENSE). |