Make labels more clear and customizable

This commit is contained in:
2016-03-15 06:06:15 -04:00
parent 9232378d04
commit ffdc923268
4 changed files with 21 additions and 10 deletions

View File

@@ -38,6 +38,13 @@ public class RepetitionCountView extends NumberView implements HabitDataView
{
super(context, attrs);
this.interval = DialogHelper.getIntAttribute(context, attrs, "interval");
int labelValue = DialogHelper.getIntAttribute(context, attrs, "labelValue");
String labelFormat = DialogHelper.getAttribute(context, attrs, "labelFormat");
if(labelValue > 0)
setLabel(String.format(labelFormat, labelValue));
refreshData();
}