You override the first DotSpan with the second. This DotSpan class allows you to create a centered color dot under the text, so if you put one on top of the other, the first one will not be visible.
I managed to create several DotSpans in the same DayViewFacade view, I'm not sure if this is the exact solution you were looking for, but I'm sure it will be useful:
, Decorator, DayViewDecorator, OrangeDecorator.
, LineBackgroundSpan, MyCustomOrangeSpan.
, DotSpan EventDecorator, , .
"decorate" ( OrangeDecorator) LineBackgroundSpan :
@Override
public void decorate(DayViewFacade view) {
view.addSpan(new MyCustomOrangeSpan(6, ContextCompat.getColor(mContext, R.color.AppOrange)));
}
drawBackground ( MyCustomOrangeSpan) , :
@Override
public void drawBackground(Canvas canvas, Paint paint, int left, int right, int top, int baseline,
int bottom, CharSequence text, int start, int end, int lnum) {
int oldColor = paint.getColor();
if (color != 0) {
paint.setColor(color);
}
canvas.drawCircle((left + right) / 2 - 20, bottom + radius, radius, paint);
paint.setColor(oldColor);
}
, DayViewDecorators LineBackgroundSpan ( ):
BlueDecorator blueDecorator = new BlueDecorator(getActivity(),eventsDays,eventsMap);
OrangeDecorator orangeDecorator = new OrangeDecorator(getActivity(),eventsDays,eventsMap);
GreenDecorator greenDecorator = new GreenDecorator(getActivity(),eventsDays,eventsMap);
materialCalendarView.addDecorator(blueDecorator);
materialCalendarView.addDecorator(orangeDecorator);
materialCalendarView.addDecorator(greenDecorator);