Skip to content

Commit

Permalink
修复三级同时滑动时,偶然出现的数组越界
Browse files Browse the repository at this point in the history
  • Loading branch information
imkarl committed Oct 7, 2016
1 parent 18c984f commit d000540
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,14 @@ public void onItemSelected(int index) {
return;
}

wv_option3.setItems(mOptions3Items.get(wv_option1.getSelectedItem()).get(index));
wv_option3.setCurrentItem(0);
if (wv_option1.getSelectedItem() < mOptions3Items.size()) {
List<List<String>> allItems3 = mOptions3Items.get(wv_option1.getSelectedItem());
if (index >= allItems3.size()) {
index = 0;
}
wv_option3.setItems(allItems3.get(index));
wv_option3.setCurrentItem(0);
}
}
});
}
Expand Down

0 comments on commit d000540

Please sign in to comment.