Fix wrapping around boundaries in number pickers when increment value isn't 1

pull/14/head
Sam Bosley 12 years ago
parent 0435b935ae
commit 2c2bc46ef7

@ -257,10 +257,10 @@ public class NumberPicker extends LinearLayout implements OnClickListener,
current = notifyChange(current);
// Wrap around the values if we go past the start or end
if (current > mEnd) {
current = mStart;
if (current > mEnd) {;
current = mStart + (current - mEnd) - 1;
} else if (current < mStart) {
current = mEnd;
current = mEnd - (mStart - current) + 1;
}
mPrevious = mCurrent;
mCurrent = current;

Loading…
Cancel
Save