We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18c984f commit d000540Copy full SHA for d000540
library/src/main/java/cn/jeesoft/widget/pickerview/WheelOptions.java
@@ -101,8 +101,14 @@ public void onItemSelected(int index) {
101
return;
102
}
103
104
- wv_option3.setItems(mOptions3Items.get(wv_option1.getSelectedItem()).get(index));
105
- wv_option3.setCurrentItem(0);
+ if (wv_option1.getSelectedItem() < mOptions3Items.size()) {
+ List<List<String>> allItems3 = mOptions3Items.get(wv_option1.getSelectedItem());
106
+ if (index >= allItems3.size()) {
107
+ index = 0;
108
+ }
109
+ wv_option3.setItems(allItems3.get(index));
110
+ wv_option3.setCurrentItem(0);
111
112
113
});
114
0 commit comments