5
Android ListView 헤더
일종의 이벤트가있는 ListView가 있습니다. 이벤트는 날짜별로 정렬되어 있으며 매일 날짜가있는 헤더를 갖고 싶습니다. 그러면 이벤트가 아래에서 수신됩니다. 이 목록을 채우는 방법은 다음과 같습니다. ArrayList<TwoText> crs = new ArrayList<TwoText>(); crs.add(new TwoText("This will be header", event.getDate())); for (Event event : events) { crs.add(new TwoText(event.getStartString() + "-" + event.getEndString(), event.getSubject())); } arrayAdapter = …