|
|
@ -67,12 +67,14 @@ public class HabitHistoryView extends ScrollableDataView
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isBackgroundTransparent;
|
|
|
|
private boolean isBackgroundTransparent;
|
|
|
|
private int textColor;
|
|
|
|
private int textColor;
|
|
|
|
|
|
|
|
private boolean isEditable;
|
|
|
|
|
|
|
|
|
|
|
|
public HabitHistoryView(Context context, AttributeSet attrs)
|
|
|
|
public HabitHistoryView(Context context, AttributeSet attrs)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
super(context, attrs);
|
|
|
|
super(context, attrs);
|
|
|
|
this.primaryColor = ColorHelper.palette[7];
|
|
|
|
this.primaryColor = ColorHelper.palette[7];
|
|
|
|
this.checkmarks = new int[0];
|
|
|
|
this.checkmarks = new int[0];
|
|
|
|
|
|
|
|
this.isEditable = false;
|
|
|
|
init();
|
|
|
|
init();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -353,6 +355,8 @@ public class HabitHistoryView extends ScrollableDataView
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean onSingleTapUp(MotionEvent e)
|
|
|
|
public boolean onSingleTapUp(MotionEvent e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if(!isEditable) return false;
|
|
|
|
|
|
|
|
|
|
|
|
int pointerId = e.getPointerId(0);
|
|
|
|
int pointerId = e.getPointerId(0);
|
|
|
|
float x = e.getX(pointerId);
|
|
|
|
float x = e.getX(pointerId);
|
|
|
|
float y = e.getY(pointerId);
|
|
|
|
float y = e.getY(pointerId);
|
|
|
@ -397,4 +401,9 @@ public class HabitHistoryView extends ScrollableDataView
|
|
|
|
|
|
|
|
|
|
|
|
return date.getTimeInMillis();
|
|
|
|
return date.getTimeInMillis();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setIsEditable(boolean isEditable)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.isEditable = isEditable;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|