Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit d945cff

Browse files
authored
Update README.md
1 parent 6c68d2b commit d945cff

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,24 @@ A lightweight library to show loading animation inside a button
44
[![](https://jitpack.io/v/droidbond/LoadingButton.svg)](https://jitpack.io/v/droidbond/LoadingButton)
55

66
## Installation (with Gradle)
7-
Add the dependency to your *build.gradle*:
8-
7+
Add the dependency to your root *build.gradle*:
98
```groovy
109
repositories {
1110
jcenter()
1211
maven { url "https://jitpack.io" }
1312
}
13+
```
14+
Now add this dependency in your module *build.gradle*
15+
```groovy
1416
dependencies {
15-
implementation 'com.github.droidbond:LoadingButton:0.1.4'
17+
implementation 'com.github.droidbond:LoadingButton:0.1.5'
1618
}
1719
```
18-
```
19-
minSdk 15
20-
targetSdk 28
21-
```
2220

2321
### Demo
2422
<img src="https://github.com/droidbond/LoadingButton/blob/master/device-2018-11-22-155730.png" width="250">
2523
<img src="https://github.com/droidbond/LoadingButton/blob/master/device-2018-11-22-155750.png" width="250">
24+
<img src="https://github.com/droidbond/LoadingButton/blob/master/device-2018-11-26-120750.png" width="250">
2625

2726
### How to use
2827
For using custom attributes use `app` namespace
@@ -62,6 +61,9 @@ xmlns:app="http://schemas.android.com/apk/res-auto"
6261
<enum name="small" value="18"/>
6362
</attr>
6463
```
64+
```java
65+
LoadingButton custombtn = findViewById(R.id.custombtn);
66+
```
6567
### Show Loading
6668
```java
6769
custombtn.showLoading()
@@ -70,5 +72,13 @@ custombtn.showLoading()
7072
```java
7173
custombtn.hideLoading()
7274
```
75+
### Show Success
76+
```java
77+
custombtn.showSuccess()
78+
```
79+
### Show Error
80+
```java
81+
custombtn.showError()
82+
```
7383

7484
For a complete example see the sample app https://github.com/droidbond/LoadingButton/tree/master/app

0 commit comments

Comments
 (0)