Draw month name on the correct column

Fixes #55
This commit is contained in:
2016-03-20 17:10:57 -04:00
parent ae0dad9120
commit f9377e1768

View File

@@ -310,8 +310,11 @@ public class HabitHistoryView extends ScrollableDataView
private void drawColumnHeader(Canvas canvas, Rect location, GregorianCalendar date)
{
String month = dfMonth.format(date.getTime());
String year = dfYear.format(date.getTime());
GregorianCalendar forwardDate = (GregorianCalendar) date.clone();
forwardDate.add(Calendar.DAY_OF_YEAR, 6);
String month = dfMonth.format(forwardDate.getTime());
String year = dfYear.format(forwardDate.getTime());
if (!month.equals(previousMonth))
{