NumberSlidingPicker icon indicating copy to clipboard operation
NumberSlidingPicker copied to clipboard

java.lang.NumberFormatException when you press "next"

Open DmitrijsD opened this issue 6 years ago • 4 comments

java.lang.NumberFormatException: For input string: "222222222222222222222"

Steps to reproduce:

  1. Input manually long number
  2. Press "next" on soft keyboard

DmitrijsD avatar Apr 10 '19 19:04 DmitrijsD

also java.lang.NumberFormatException: For input string: "-"

DmitrijsD avatar Apr 11 '19 09:04 DmitrijsD

Y have the same error NumberFormatException. any update?

jjimenez0611 avatar May 07 '19 17:05 jjimenez0611

to fix, at this block:

            if (!hasFocus) {
                if (!editText.text.isNullOrEmpty()) {
                    setProgress(Integer.valueOf(editText.text.toString()), true)
                } else {
                    editText.setText(data.value.toString())
                }
            }

replace to setProgress(editText.text.toString().toIntOrNull() ?: Integer.MAX_VALUE, true)

Sash0k avatar Jan 14 '21 18:01 Sash0k

fixed in #22

GuilhE avatar Feb 18 '21 15:02 GuilhE