Last active
December 17, 2015 01:39
-
-
Save quanturium/5529738 to your computer and use it in GitHub Desktop.
Revisions
-
quanturium revised this gist
Dec 29, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ protected SortedMap<Integer, Object> initializeSections(Cursor c) if (!sections.containsValue(eventDate)) { sections.put(offset + i, eventDate); offset++; } i++; -
quanturium renamed this gist
May 7, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
quanturium created this gist
May 7, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ @Override protected SortedMap<Integer, Object> initializeSections(Cursor c) { TreeMap<Integer, Object> sections = new TreeMap<Integer, Object>(); int offset = 0, i = 0; while (c.moveToNext()) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String eventDate = sdf.format(new Date((long) c.getInt(c.getColumnIndex(EventsDatabase.COL_FROM_DATE)) * 1000)); if (!sections.containsValue(eventDate)) { sections.put(offset + i, value); offset++; } i++; } return sections; }