Add tests for HabitStreakView

This commit is contained in:
2016-03-30 21:02:05 -04:00
parent 96c6a97ad0
commit f9da90a93a
4 changed files with 72 additions and 1 deletions

View File

@@ -62,11 +62,16 @@ public class HabitStreakView extends View implements HabitDataView
private boolean shouldShowLabels;
private int maxStreakCount;
public HabitStreakView(Context context)
{
super(context);
init();
}
public HabitStreakView(Context context, AttributeSet attrs)
{
super(context, attrs);
this.primaryColor = ColorHelper.palette[7];
streaks = Collections.emptyList();
init();
}
@@ -83,6 +88,8 @@ public class HabitStreakView extends View implements HabitDataView
createPaints();
createColors();
streaks = Collections.emptyList();
dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM);
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
rect = new RectF();