You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
我用这个库做省市区三级联动时遇到的问题,有的省份或者城市下没有区,通过refreshByNewDisplayedValues方法设置一个空的String数组,然后就会抛异常,能否处理这样的问题呢?
java.lang.IllegalArgumentException: mMaxValue - mMinValue + 1 should not be greater than mDisplayedValues.length, now ((mMaxValue - mMinValue + 1) is 1 newDisplayedValues.length is 0, you need to set MaxValue and MinValue before setDisplayedValues(String[])
at cn.carbswang.android.numberpickerview.library.NumberPickerView.setDisplayedValues(NumberPickerView.java:505)
at cn.microants.merchants.app.store.fragment.CityPickerDialog.refreshByNewDisplayedValues(CityPickerDialog.java:173)
at cn.microants.merchants.app.store.fragment.CityPickerDialog.updateCities(CityPickerDialog.java:134)
at cn.microants.merchants.app.store.fragment.CityPickerDialog.onValueChange(CityPickerDialog.java:120)
at cn.carbswang.android.numberpickerview.library.NumberPickerView.respondPickedValueChanged(NumberPickerView.java:627)
at cn.carbswang.android.numberpickerview.library.NumberPickerView.access$1200(NumberPickerView.java:24)
at cn.carbswang.android.numberpickerview.library.NumberPickerView$1.handleMessage(NumberPickerView.java:362)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
The text was updated successfully, but these errors were encountered:
我用这个库做省市区三级联动时遇到的问题,有的省份或者城市下没有区,通过refreshByNewDisplayedValues方法设置一个空的String数组,然后就会抛异常,能否处理这样的问题呢?
java.lang.IllegalArgumentException: mMaxValue - mMinValue + 1 should not be greater than mDisplayedValues.length, now ((mMaxValue - mMinValue + 1) is 1 newDisplayedValues.length is 0, you need to set MaxValue and MinValue before setDisplayedValues(String[])
at cn.carbswang.android.numberpickerview.library.NumberPickerView.setDisplayedValues(NumberPickerView.java:505)
at cn.microants.merchants.app.store.fragment.CityPickerDialog.refreshByNewDisplayedValues(CityPickerDialog.java:173)
at cn.microants.merchants.app.store.fragment.CityPickerDialog.updateCities(CityPickerDialog.java:134)
at cn.microants.merchants.app.store.fragment.CityPickerDialog.onValueChange(CityPickerDialog.java:120)
at cn.carbswang.android.numberpickerview.library.NumberPickerView.respondPickedValueChanged(NumberPickerView.java:627)
at cn.carbswang.android.numberpickerview.library.NumberPickerView.access$1200(NumberPickerView.java:24)
at cn.carbswang.android.numberpickerview.library.NumberPickerView$1.handleMessage(NumberPickerView.java:362)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
The text was updated successfully, but these errors were encountered: