package com.prolificinteractive.materialcalendarview.spans;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.text.style.LineBackgroundSpan;

public class DotSpan implements LineBackgroundSpan {

    private static final float DEFAULT_RADIUS = 3;

    private final float radius;
    private final int color;

    public DotSpan() {
        this.radius = DEFAULT_RADIUS;
        this.color = 0;
    }

    public DotSpan(int color) {
        this.radius = DEFAULT_RADIUS;
        this.color = color;
    }

    public DotSpan(float radius) {
        this.radius = radius;
        this.color = 0;
    }

    public DotSpan(float radius, int color) {
        this.radius = radius;
        this.color = color;
    }

    @Override
    public void drawBackground(
            Canvas canvas, Paint paint,
            int left, int right, int top, int baseline, int bottom,
            CharSequence charSequence,
            int start, int end, int lineNum
    ) {
        int oldColor = paint.getColor();
        if(color != 0) {
            paint.setColor(color);
        }
        canvas.drawCircle((left + right) / 2, bottom + radius, radius, paint);
        paint.setColor(oldColor);
    }
}

@@ -164,16 +164,79 @@
 dSpan;%0A%0A
+/**%0A * Span to draw a dot centered under a section of text%0A */%0A
 public c
@@ -285,23 +285,65 @@
  %7B%0A%0A    
-private
+/**%0A     * Default radius used%0A     */%0A    public
  static 
@@ -437,16 +437,93 @@
 color;%0A%0A
+    /**%0A     * @see #DotSpan(float, int)%0A     * @see #DEFAULT_RADIUS%0A     */%0A
     publ
@@ -598,32 +598,109 @@
 lor = 0;%0A    %7D%0A%0A
+    /**%0A     * @see #DotSpan(float, int)%0A     * @see #DEFAULT_RADIUS%0A     */%0A
     public DotSp
@@ -780,32 +780,81 @@
 = color;%0A    %7D%0A%0A
+    /**%0A     * @see #DotSpan(float, int)%0A     */%0A
     public DotSp
@@ -929,24 +929,194 @@
 = 0;%0A    %7D%0A%0A
+    /**%0A     * Create a span to draw a dot using a specified radius and color%0A     *%0A     * @param radius radius for the dot%0A     * @param color color of the dot%0A     */%0A
     public D

Add javadoc for DotSpan