Show multiple lines on check mark widget

pull/84/merge
Alinson S. Xavier 10 years ago
parent 980db1d171
commit c6e76f4cfd

@ -123,9 +123,9 @@ public class CheckmarkView extends FrameLayout implements HabitDataView
public void setHabit(@NonNull Habit habit) public void setHabit(@NonNull Habit habit)
{ {
this.habit = habit; this.habit = habit;
this.name = habit.name;
this.activeColor = ColorHelper.getColor(getContext(), habit.color); this.activeColor = ColorHelper.getColor(getContext(), habit.color);
refresh(); refresh();
postInvalidate();
} }
public void refresh() public void refresh()
@ -164,6 +164,7 @@ public class CheckmarkView extends FrameLayout implements HabitDataView
label.setText(name); label.setText(name);
requestLayout();
postInvalidate(); postInvalidate();
} }
@ -189,11 +190,9 @@ public class CheckmarkView extends FrameLayout implements HabitDataView
public void refreshData() public void refreshData()
{ {
if(habit == null) return; if(habit == null) return;
this.name = habit.name;
this.percentage = (float) habit.scores.getTodayValue() / Score.MAX_VALUE; this.percentage = (float) habit.scores.getTodayValue() / Score.MAX_VALUE;
this.checkmarkValue = habit.checkmarks.getTodayValue(); this.checkmarkValue = habit.checkmarks.getTodayValue();
refresh(); refresh();
postInvalidate();
} }
} }

Loading…
Cancel
Save