1 2 3 4
拼成1,2,3,4
StringBuffer sb = new StringBuffer();
if (lists.size() == 1) {
sb.append(lists.get(0).getId());
} else {
for (int i = 0; i < lists.size(); i++) {
if (i == lists.size() - 1) {
sb.append(lists.get(i).getId().trim());
} else {
sb.append(lists.get(i).getId().trim() + ",");
}
}
}
// ToastUtils.showShortToast(MySubjectActivity.this, sb.toString());