Skip to content

Commit

Permalink
update progress button
Browse files Browse the repository at this point in the history
  • Loading branch information
jyuesong committed May 24, 2017
1 parent e29fa5b commit 14d764a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Add it in your root build.gradle at the end of repositories:
Step 2. Add the dependency
dependencies {
compile 'com.github.jiang111:CProgressButton:v1.2'
compile 'com.github.jiang111:CProgressButton:v1.2.2'
}
```

Expand Down
4 changes: 2 additions & 2 deletions pbutton/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionCode 4
versionName "1.2.1"
versionCode 5
versionName "1.2.2"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ public STATE getState() {
return mState;
}

private void setState(STATE state) {
setState(state, true);
}

private void setState(STATE state, boolean anim) {
if (state == mState) {
Expand Down Expand Up @@ -366,14 +363,18 @@ public void download(int progress) {

@Override
public void normal(int status) {
normal(status, true);
}

public void normal(int status, boolean anim) {
resultString = statusString[status];
setState(STATE.NORMAL);
setState(STATE.NORMAL, anim);
}

@Override
public void startDownLoad() {
resultString = "";
setState(STATE.PROGRESS);
setState(STATE.PROGRESS, true);

}

Expand Down

0 comments on commit 14d764a

Please sign in to comment.