This repository was archived by the owner on Jul 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -4,25 +4,24 @@ A lightweight library to show loading animation inside a button
4
4
[ ![ ] ( https://jitpack.io/v/droidbond/LoadingButton.svg )] ( https://jitpack.io/v/droidbond/LoadingButton )
5
5
6
6
## Installation (with Gradle)
7
- Add the dependency to your * build.gradle* :
8
-
7
+ Add the dependency to your root * build.gradle* :
9
8
``` groovy
10
9
repositories {
11
10
jcenter()
12
11
maven { url "https://jitpack.io" }
13
12
}
13
+ ```
14
+ Now add this dependency in your module * build.gradle*
15
+ ``` groovy
14
16
dependencies {
15
- implementation 'com.github.droidbond:LoadingButton:0.1.4 '
17
+ implementation 'com.github.droidbond:LoadingButton:0.1.5 '
16
18
}
17
19
```
18
- ```
19
- minSdk 15
20
- targetSdk 28
21
- ```
22
20
23
21
### Demo
24
22
<img src =" https://github.com/droidbond/LoadingButton/blob/master/device-2018-11-22-155730.png " width =" 250 " >
25
23
<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 " >
26
25
27
26
### How to use
28
27
For using custom attributes use ` app ` namespace
@@ -62,6 +61,9 @@ xmlns:app="http://schemas.android.com/apk/res-auto"
62
61
<enum name =" small" value =" 18" />
63
62
</attr >
64
63
```
64
+ ``` java
65
+ LoadingButton custombtn = findViewById(R . id. custombtn);
66
+ ```
65
67
### Show Loading
66
68
``` java
67
69
custombtn. showLoading()
@@ -70,5 +72,13 @@ custombtn.showLoading()
70
72
``` java
71
73
custombtn. hideLoading()
72
74
```
75
+ ### Show Success
76
+ ``` java
77
+ custombtn. showSuccess()
78
+ ```
79
+ ### Show Error
80
+ ``` java
81
+ custombtn. showError()
82
+ ```
73
83
74
84
For a complete example see the sample app https://github.com/droidbond/LoadingButton/tree/master/app
You can’t perform that action at this time.
0 commit comments