diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index ce10584..79efcda 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/README.md b/README.md index 5a57d31..c70aff4 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ ```groovy dependencies { - implementation 'com.github.shengMR:EasySeekBar:v1.0.12' + implementation 'com.github.shengMR:EasySeekBar:v1.0.13' } ``` diff --git a/lib/build.gradle b/lib/build.gradle index e50cf70..b259441 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -6,8 +6,8 @@ android { defaultConfig { minSdkVersion 19 targetSdkVersion 28 - versionCode 13 - versionName "1.0.12" + versionCode 14 + versionName "1.0.13" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/lib/src/main/java/com/sheng/lib/EasySeekBar.java b/lib/src/main/java/com/sheng/lib/EasySeekBar.java index c3173f7..b8a5041 100644 --- a/lib/src/main/java/com/sheng/lib/EasySeekBar.java +++ b/lib/src/main/java/com/sheng/lib/EasySeekBar.java @@ -19,7 +19,6 @@ import android.support.annotation.Nullable; import android.text.TextUtils; import android.util.AttributeSet; -import android.util.Log; import android.view.Gravity; import android.view.MotionEvent; import android.view.View; @@ -2126,15 +2125,15 @@ public int getSelectIndex() { return this.diySelectIndex; } - public void setThumbProgress(final int progress) { + public void setThumbProgress(final int value) { + this.thumbProgress = value; autoInitWith(false); this.post(new Runnable() { @Override public void run() { if (isThumbAndProgressPart) { - thumbProgress = progress; float delta = max - min; - float result = (progress - min) * 1.0f / delta * barDstRectF.width() + barDstRectF.left; + float result = (thumbProgress - min) * 1.0f / delta * barDstRectF.width() + barDstRectF.left; if (isOpenAnimator) { if (valueAnimatorForThumb != null) { valueAnimatorForThumb.cancel(); @@ -2164,15 +2163,14 @@ public int getThumbProgress() { return (int) this.thumbProgress; } - public void setProgress(final int progress) { - this.progress = progress; + public void setProgress(final int value) { + this.progress = value; autoInitWith(false); this.post(new Runnable() { @Override public void run() { float delta = max - min; if (isThumbAndProgressPart) { - Log.d(TAG, "ssssss = 开始rogressDstRectF.right : " + progressDstRectF.right); float result = (progress - min) * 1.0f / delta * barDstRectF.width() + barDstRectF.left; if (isOpenAnimator) { if (valueAnimatorForProgress != null) { @@ -2186,7 +2184,6 @@ public void run() { public void onAnimationUpdate(ValueAnimator animation) { float value = (float) animation.getAnimatedValue(); progressDstRectF.right = value; - Log.d(TAG, "ssssss = rogressDstRectF.right : " + progressDstRectF.right); invalidate(); } }); @@ -2231,8 +2228,8 @@ public int getProgressForInt() { return (int) this.progress; } - public void setLowProgress(int lowProgress) { - this.lowProgress = lowProgress; + public void setLowProgress(int value) { + this.lowProgress = value; autoInit(); postInvalidate(); } @@ -2241,8 +2238,8 @@ public int getLowProgress() { return (int) this.lowProgress; } - public void setHeightProgress(int heightProgress) { - this.heightProgress = heightProgress; + public void setHeightProgress(int value) { + this.heightProgress = value; autoInit(); postInvalidate(); } @@ -2251,8 +2248,8 @@ public int getHeightProgress() { return (int) this.heightProgress; } - public void setMax(int max) { - this.max = max; + public void setMax(int value) { + this.max = value; autoInit(); postInvalidate(); } @@ -2261,8 +2258,8 @@ public int getMax() { return (int) max; } - public void setMin(int min) { - this.min = min; + public void setMin(int value) { + this.min = value; autoInit(); postInvalidate(); }