Commit 80cc9a3e authored by zooble's avatar zooble Committed by GitHub

Merge pull request #230 from sword-art/master

fix crash
parents 657e6553 ed5f6ca8
......@@ -190,6 +190,8 @@ public class PickerViewLinkage extends LinearLayout {
threeList.clear();
threeList = arrayToList(sunArray);
checkItems(loopViewThree, threeList);
if(threeList!=null&&threeList.size()>0){
returnData2.setItem(threeList.get(0));
returnData2.setIndex(loopViewThree.getSelectedIndex());
if (curSelectedList.size() > 2) {
......@@ -197,6 +199,7 @@ public class PickerViewLinkage extends LinearLayout {
} else {
curSelectedList.add(2, returnData2);
}
}
loopViewOne.setListener(new OnItemSelectedListener() {
@Override
......@@ -230,14 +233,17 @@ public class PickerViewLinkage extends LinearLayout {
threeList = arrayToList(sunArray);
checkItems(loopViewThree, threeList);
returnData2 = new ReturnData();
if (threeList!=null&&threeList.size()>0){
returnData2.setItem(threeList.get(0));
returnData2.setIndex(loopViewThree.getSelectedIndex());
curSelectedList.set(2, returnData2);
if (onSelectedListener != null) {
onSelectedListener.onSelected(curSelectedList);
}
}
}
});
loopViewTwo.setListener(new OnItemSelectedListener() {
......@@ -264,12 +270,18 @@ public class PickerViewLinkage extends LinearLayout {
curSelectedList.set(1, returnData1);
returnData2 = new ReturnData();
if (threeList!=null&&threeList.size()>0){
returnData2.setItem(threeList.get(0));
returnData2.setIndex(loopViewThree.getSelectedIndex());
curSelectedList.set(2, returnData2);
if (onSelectedListener != null) {
onSelectedListener.onSelected(curSelectedList);
}
}
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment