Open WonderCsabo opened 8 years ago
This also happens if i click the side of the thumb towards to end of the range.
@oli107 this only happens if pinRadius="0dp"
.
@oli107 after some debugging the problems happens in onActionUp
, but i could not find the exact line.
@oli107 sorry for pinging but can you check this issue?
yes its a bug.I have replicated it many times. There is no check for bounds.
my dummy qucik fix workeround : private RangeBar rangeBar; private int min; private int max;
rangeBar.setOnRangeBarChangeListener(new RangeBar.OnRangeBarChangeListener() { @Override public void onRangeChangeListener(RangeBar rangeBar, int leftPinIndex, int rightPinIndex, String leftPinValue, String rightPinValue) { int left = Integer.valueOf(leftPinValue); int right = Integer.valueOf(rightPinValue); if (left < min) { rangeBar.setRangePinsByValue(min, right); } if (right > max) { rangeBar.setRangePinsByValue(left, max); } }
If i drag the thumb fast towards the edge of the screen, it is possible to move the thumb out of the range. I am using
pinRadius
0dp
andselectorSize
16dp
.Please see attached screenshot. Normally the min value is 0.