Skip to content

Commit 907d4da

Browse files
ChoiAidenChoiAiden
authored andcommitted
Add readme.
1 parent 1ec3e85 commit 907d4da

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[![](https://jitpack.io/v/m0er/androidannotations-interval-click-plugin.svg)](https://jitpack.io/#m0er/androidannotations-interval-click-plugin)
2+
3+
# AndroidAnnotations Interval Click Plugin
4+
An [Android Annotations](https://github.com/androidannotations/androidannotations/) custom plugin to prevent multiple click.
5+
6+
## Usage
7+
8+
Add it in your root build.gradle at the end of repositories:
9+
10+
```groovy
11+
allprojects {
12+
repositories {
13+
...
14+
maven { url "https://jitpack.io" }
15+
}
16+
}
17+
```
18+
19+
Add the dependency:
20+
21+
```groovy
22+
dependencies {
23+
apt 'org.androidannotations:androidannotations:4.1.0'
24+
compile 'org.androidannotations:androidannotations-api:4.1.0'
25+
apt 'com.github.m0er.androidannotations-interval-click-plugin:intervalclick:1.0.1'
26+
compile 'com.github.m0er.androidannotations-interval-click-plugin:intervalclick-api:1.0.1'
27+
}
28+
```
29+
30+
Default interval delay is 600ms.
31+
32+
```java
33+
@IntervalClick
34+
void someButton() {
35+
Toast.makeText(this, "Click!!", Toast.LENGTH_SHORT).show();
36+
}
37+
```
38+
39+
You can customize it:
40+
41+
```java
42+
@IntervalClick(intervalMilliseconds = 1000)
43+
void someButton() {
44+
Toast.makeText(this, "Click!!", Toast.LENGTH_SHORT).show();
45+
}
46+
```

0 commit comments

Comments
 (0)