Collections.sort(mList, new Comparator<JinlyoTimeVO>() {
@Override
public int compare(JinlyoTimeVO s1, JinlyoTimeVO s2) {
if (s1.getSorting() < s2.getSorting()) {
return -1;
} else if (s1.getSorting() > s2.getSorting()) {
return 1;
}
return 0;
}
});
글자를 정렬할때!
Collections.sort(tmpList, new Comparator<ItemVO>() {
public int compare(ItemVO s1, ItemVO s2) {
return s2.edate.compareTo(s1.edate);
}
});
'Android' 카테고리의 다른 글
안드로이드 스튜디오 JDK11로 설정! (0) | 2022.01.03 |
---|---|
안드로이드 Debug SHA Key 추출 방법 (0) | 2021.12.06 |
AlertDialog EditText 마진 넣기 (0) | 2020.11.05 |
안드로이드 상태바 색상 변경 (0) | 2020.10.22 |
안드로이드 키보드 내리기 및 화면 리사이즈 (0) | 2020.04.16 |