// Path: app/src/main/java/top/soyask/calendarii/entity/Symbol.java
// public enum Symbol {
//     RECT("rect", 1),
//     CIRCLE("circle", 2),
//     TRIANGLE("triangle", 3),
//     STAR("star", 4),
//     HEART("heart", 5),
//     ;
// 
//     public final String KEY;
//     public final int VALUE;
// 
//     Symbol(String key, int value) {
//         this.KEY = key;
//         this.VALUE = value;
//     }
// 
// }
// 
// Path: app/src/main/java/top/soyask/calendarii/utils/DayUtils.java
// public class DayUtils {
//     /**
//      * @param month 传入实际的月份
//      * @param year
//      * @return
//      */
//     public static int getMonthDayCount(int month, int year) {
//         month = month - 1;
//         switch (month) {
//             case Calendar.JANUARY:
//             case Calendar.MARCH:
//             case Calendar.MAY:
//             case Calendar.JULY:
//             case Calendar.AUGUST:
//             case Calendar.OCTOBER:
//             case Calendar.DECEMBER:
//                 return 31;
//             case Calendar.APRIL:
//             case Calendar.JUNE:
//             case Calendar.SEPTEMBER:
//             case Calendar.NOVEMBER:
//                 return 30;
//             case Calendar.FEBRUARY:
//                 return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) ? 29 : 28;
//             default:
//                 throw new IllegalArgumentException("Didn't find this month(未找到该月份):" + month);
//         }
// 
//     }
// 
//     public static int getPrevMonthDayCount(int month, int year) {
//         if (month > 1) {
//             month--;
//         } else {
//             year--;
//         }
//         return getMonthDayCount(month, year);
//     }
// 
// 
//     public static int getDayForWeek(Calendar calendar) {
//         int date = calendar.get(Calendar.DAY_OF_MONTH);
//         if (date < 1 || date > 31) {
//             return 1;
//         }
//         return calendar.get(Calendar.DAY_OF_WEEK) - 1;
//     }
// 
//     public static int getWeekForMonth(Calendar calendar) {
//         int date = calendar.get(Calendar.DAY_OF_MONTH);
//         if (date < 1 || date > 31) {
//             return 1;
//         }
//         return calendar.get(Calendar.WEEK_OF_MONTH);
//     }
// }


import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.animation.Animation;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import top.soyask.calendarii.R;
import top.soyask.calendarii.entity.Symbol;
import top.soyask.calendarii.utils.DayUtils;
            drawBottomText(canvas);
            if (day.hasEvent()) {
                drawEventSymbol(canvas);
            }
            if (day.isHoliday()) {
                drawHoliday(canvas, holidayTextColor, holidayBgColor);
            }
            if (day.isWorkday()) {
                drawWorkday(canvas);
            }
            if (day.hasBirthday()) {
                drawBirthday(canvas);
            }
        }

        private void drawNumber(Canvas canvas, int color) {
            paint.setColor(color);
            paint.setStyle(Paint.Style.FILL);
            canvas.drawText(String.valueOf(day.getDayOfMonth()), rect.centerX(), rect.centerY(), paint);
        }

        private void drawBottomText(Canvas canvas) {
            paint.setTextSize(mDateBottomTextSize);
            float bottomTextY = rect.centerY() + rect.height() / 4 + mDateBottomTextSize / 2; //将底部文居中在在3/4处
            canvas.drawText(day.getBottomText(), rect.centerX(), bottomTextY, paint);
        }

        private void drawEventSymbol(Canvas canvas) {
            float symbolCenterX = rect.centerX() + rect.width() / 6;
            float symbolCenterY = rect.centerY() + mEventRectSize / 2;
// Path: app/src/main/java/top/soyask/calendarii/entity/Symbol.java
// public enum Symbol {
//     RECT("rect", 1),
//     CIRCLE("circle", 2),
//     TRIANGLE("triangle", 3),
//     STAR("star", 4),
//     HEART("heart", 5),
//     ;
// 
//     public final String KEY;
//     public final int VALUE;
// 
//     Symbol(String key, int value) {
//         this.KEY = key;
//         this.VALUE = value;
//     }
// 
// }
// 
// Path: app/src/main/java/top/soyask/calendarii/utils/DayUtils.java
// public class DayUtils {
//     /**
//      * @param month 传入实际的月份
//      * @param year
//      * @return
//      */
//     public static int getMonthDayCount(int month, int year) {
//         month = month - 1;
//         switch (month) {
//             case Calendar.JANUARY:
//             case Calendar.MARCH:
//             case Calendar.MAY:
//             case Calendar.JULY:
//             case Calendar.AUGUST:
//             case Calendar.OCTOBER:
//             case Calendar.DECEMBER:
//                 return 31;
//             case Calendar.APRIL:
//             case Calendar.JUNE:
//             case Calendar.SEPTEMBER:
//             case Calendar.NOVEMBER:
//                 return 30;
//             case Calendar.FEBRUARY:
//                 return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) ? 29 : 28;
//             default:
//                 throw new IllegalArgumentException("Didn't find this month(未找到该月份):" + month);
//         }
// 
//     }
// 
//     public static int getPrevMonthDayCount(int month, int year) {
//         if (month > 1) {
//             month--;
//         } else {
//             year--;
//         }
//         return getMonthDayCount(month, year);
//     }
// 
// 
//     public static int getDayForWeek(Calendar calendar) {
//         int date = calendar.get(Calendar.DAY_OF_MONTH);
//         if (date < 1 || date > 31) {
//             return 1;
//         }
//         return calendar.get(Calendar.DAY_OF_WEEK) - 1;
//     }
// 
//     public static int getWeekForMonth(Calendar calendar) {
//         int date = calendar.get(Calendar.DAY_OF_MONTH);
//         if (date < 1 || date > 31) {
//             return 1;
//         }
//         return calendar.get(Calendar.WEEK_OF_MONTH);
//     }
// }


// Path: app/src/main/java/top/soyask/calendarii/ui/view/CalendarView.java
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.animation.Animation;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import top.soyask.calendarii.R;
import top.soyask.calendarii.entity.Symbol;
import top.soyask.calendarii.utils.DayUtils;

            drawBottomText(canvas);
            if (day.hasEvent()) {
                drawEventSymbol(canvas);
            }
            if (day.isHoliday()) {
                drawHoliday(canvas, holidayTextColor, holidayBgColor);
            }
            if (day.isWorkday()) {
                drawWorkday(canvas);
            }
            if (day.hasBirthday()) {
                drawBirthday(canvas);
            }
        }

        private void drawNumber(Canvas canvas, int color) {
            paint.setColor(color);
            paint.setStyle(Paint.Style.FILL);
            canvas.drawText(String.valueOf(day.getDayOfMonth()), rect.centerX(), rect.centerY(), paint);
        }

        private void drawBottomText(Canvas canvas) {
            paint.setTextSize(mDateBottomTextSize);
            float bottomTextY = rect.centerY() + rect.height() / 4 + mDateBottomTextSize / 2; //将底部文居中在在3/4处
            canvas.drawText(day.getBottomText(), rect.centerX(), bottomTextY, paint);
        }

        private void drawEventSymbol(Canvas canvas) {
            float symbolCenterX = rect.centerX() + rect.width() / 6;
            float symbolCenterY = rect.centerY() + mEventRectSize / 2;
            Symbol symbol = day.getSymbol();