Skip to content

Commit

Permalink
Merge pull request #12 from PeoceWang/master
Browse files Browse the repository at this point in the history
Fix when quick click button twice time,the animation view are not clear
  • Loading branch information
jd-alexander committed Feb 1, 2016
2 parents 7b31143 + 831ecdc commit 0f7d746
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions likebutton/src/main/java/com/like/DotsView.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ private void updateInnerDotsPosition() {
} else {
this.currentRadius2 = maxInnerDotsRadius;
}

if (currentProgress < 0.2) {
if (currentProgress == 0) {
this.currentDotSize2 = 0;
} else if (currentProgress < 0.2) {
this.currentDotSize2 = maxDotSize;
} else if (currentProgress < 0.5) {
this.currentDotSize2 = (float) Utils.mapValueFromRangeToRange(currentProgress, 0.2f, 0.5f, maxDotSize, 0.3 * maxDotSize);
Expand All @@ -138,8 +139,9 @@ private void updateOuterDotsPosition() {
} else {
this.currentRadius1 = (float) Utils.mapValueFromRangeToRange(currentProgress, 0.3f, 1f, 0.8f * maxOuterDotsRadius, maxOuterDotsRadius);
}

if (currentProgress < 0.7) {
if (currentProgress == 0) {
this.currentDotSize1 = 0;
} else if (currentProgress < 0.7) {
this.currentDotSize1 = maxDotSize;
} else {
this.currentDotSize1 = (float) Utils.mapValueFromRangeToRange(currentProgress, 0.7f, 1f, maxDotSize, 0);
Expand Down

0 comments on commit 0f7d746

Please sign in to comment.