syedowaisali / crystal-range-seekbar

538 stars 166 forks source link

Bug found in: CrystalRangeSeekbar.setMinStartValue(float) #6

Closed 12301104-LuYunfeng closed 8 years ago

12301104-LuYunfeng commented 8 years ago

When the range is smaller than 100, it went wrong. Here is the reson: when update the maxStartValue in method apply(), // set max start value if (maxStartValue <= minStartValue || maxStartValue <= minValue) { maxStartValue = 0; setNormalizedMaxValue(maxStartValue); } else if(maxStartValue >= maxValue){ maxStartValue = maxValue; setMaxStartValue(); } else{ setMaxStartValue(); }

minStartValue is not the value that set before any more. so it goes to the wrong condition.

You can reproduce the issue by:

rangeSeekbar.setMinValue(2).setMaxValue(17).setMinStartValue(4).setMaxStartValue(8).apply();

syedowaisali commented 8 years ago

Thanks @12301104-LuYunfeng

Bug fixed in new version 1.1.2