Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refreshByNewDisplayedValues的问题 #30

Open
729286938 opened this issue Feb 23, 2017 · 0 comments
Open

refreshByNewDisplayedValues的问题 #30

729286938 opened this issue Feb 23, 2017 · 0 comments

Comments

@729286938
Copy link

我用这个库做省市区三级联动时遇到的问题,有的省份或者城市下没有区,通过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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant