Fixed a bug in the number picker that could throw a numberformatexception

pull/14/head
Sam Bosley 14 years ago
parent 77286781f2
commit 86f5357e56

@ -313,6 +313,7 @@ public class NumberPicker extends LinearLayout implements OnClickListener,
}
private void validateCurrentView(CharSequence str, boolean notifyChange) {
if (!TextUtils.isEmpty(str)) {
int val = getSelectedPos(str.toString());
if ((val >= mStart) && (val <= mEnd)) {
mPrevious = mCurrent;
@ -320,6 +321,7 @@ public class NumberPicker extends LinearLayout implements OnClickListener,
if (notifyChange)
notifyChange(mCurrent);
}
}
updateView();
}

Loading…
Cancel
Save