ArrayList 날짜 비교 정렬
숫자 정렬도 가능
Collections.sort(Database.arrayList, new Comparator<DataModel>() {
@Override
public int compare(DataModel date1, DataModel date2) {
return date1.getDateTime().compareTo(date2.getDateTime);
}
});
'android' 카테고리의 다른 글
화면 가로, 세로 고정 (0) | 2017.10.10 |
---|---|
안드로이드 파일경로, 파일명, uri 아이디 찾기 (0) | 2017.06.02 |
AsyncTask httpConnection (0) | 2016.12.27 |
안드로이드 웹뷰 자동회전 리로드 방지 (0) | 2016.11.04 |
recyclerView 스크롤 끝으로 보내기 (0) | 2016.10.05 |