This repository was archived by the owner on Jul 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
2827For 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
6769custombtn. showLoading()
@@ -70,5 +72,13 @@ custombtn.showLoading()
7072``` java
7173custombtn. hideLoading()
7274```
75+ ### Show Success
76+ ``` java
77+ custombtn. showSuccess()
78+ ```
79+ ### Show Error
80+ ``` java
81+ custombtn. showError()
82+ ```
7383
7484For 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