Skip to content

Commit

Permalink
Improve the seekbar with #49
Browse files Browse the repository at this point in the history
  • Loading branch information
qiujuer committed Apr 8, 2016
1 parent 9f035eb commit 855edbe
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,14 @@ public int getMax() {
*/
public void setMax(int max) {
mMax = max;
if (mMax < mMin) {
if (mMax <= mMin) {
setMin(mMax - 1);
}
updateKeyboardRange();
mSeekBarDrawable.setNumSegments(mMax - mMin);

if (mValue < mMin || mValue > mMax) {
setProgress(mMin);
setProgress(mValue);
} else {
updateThumbPosForScale(-1);
}
Expand Down Expand Up @@ -443,7 +443,7 @@ public void setMin(int min) {
mSeekBarDrawable.setNumSegments(mMax - mMin);

if (mValue < mMin || mValue > mMax) {
setProgress(mMin);
setProgress(mValue);
} else {
updateThumbPosForScale(-1);
}
Expand Down Expand Up @@ -966,9 +966,9 @@ protected void onRestoreInstanceState(Parcelable state) {

/**
* Interface to transform the current internal value of this AbsSeekBar to anther one for the visualization.
* <p/>
* <p>
* This will be used on the floating bubble to display a different value if needed.
* <p/>
* <p>
* Using this in conjunction with {@link #setIndicatorFormatter(String)} you will be able to manipulate the
* value seen by the user
*
Expand Down

0 comments on commit 855edbe

Please sign in to comment.