// Path: app/src/main/java/de/arnowelzel/android/periodical/PeriodicalDatabase.java
// public static class DayEntry {
//     final static int EMPTY = 0;
//     final static int PERIOD_START = 1;
//     final static int PERIOD_CONFIRMED = 2;
//     final static int PERIOD_PREDICTED = 3;
//     final static int FERTILITY_PREDICTED = 4;
//     final static int OVULATION_PREDICTED = 5;
//     final static int FERTILITY_FUTURE = 6;
//     final static int OVULATION_FUTURE = 7;
//     final static int INFERTILE_PREDICTED = 8;
//     final static int INFERTILE_FUTURE = 9;
//     int type;
//     final GregorianCalendarExt date;
//     int dayofcycle;
//     int intensity;
//     String notes;
//     List<Integer> symptoms;
// 
//     /**
//      * Construct a new day entry with parameters
//      *
//      * @param type       Entry type (DayEntry.EMPTY, DayEntry.PERIOD_START, DayEntry.PERIOD_CONFIRMED, ...)
//      * @param date       Entry date
//      * @param dayofcycle Day within current cycle (beginning with 1)
//      * @param intensity  Intensity of the period (1-4)
//      */
//     DayEntry(int type, GregorianCalendar date, int dayofcycle, int intensity) {
//         this.type = type;
//         this.date = new GregorianCalendarExt();
//         this.date.setTime(date.getTime());
//         this.dayofcycle = dayofcycle;
//         this.intensity = intensity;
//         this.notes = "";
//         this.symptoms = new ArrayList<>();
//     }
// 
//     /**
//      * Construct a new day entry
//      */
//     DayEntry() {
//         this.type = EMPTY;
//         this.date = new GregorianCalendarExt();
//         this.dayofcycle = 0;
//         this.intensity = 1;
//         this.notes = "";
//         this.symptoms = new ArrayList<>();
//     }
// }


import android.annotation.SuppressLint;
import android.text.format.DateUtils;
import de.arnowelzel.android.periodical.PeriodicalDatabase.DayEntry;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;
import android.widget.Button;
    private final Bitmap bitmapIntercourse;
    /**
     * Bitmap for entries with flag "intercourse" (black variant)
     */
    private final Bitmap bitmapIntercourseBlack;
    /**
     * Bitmap for entries with flag "notes"
     */
    private final Bitmap bitmapNotes;
    /**
     * Bitmap for entries with flag "notes" (black variant)
     */
    private final Bitmap bitmapNotesBlack;
    /**
     * Paint for bitmaps
     */
    private final Paint paintBitmap;

    /* Current view orientation (portrait, landscape) */
    private int orientation;

    /**
     * Constructor
     *
     * @param context Application context
     * @param attrs   Resource attributes
     */
    public CalendarCell(Context context, AttributeSet attrs) {
        super(context, attrs);

// Path: app/src/main/java/de/arnowelzel/android/periodical/PeriodicalDatabase.java
// public static class DayEntry {
//     final static int EMPTY = 0;
//     final static int PERIOD_START = 1;
//     final static int PERIOD_CONFIRMED = 2;
//     final static int PERIOD_PREDICTED = 3;
//     final static int FERTILITY_PREDICTED = 4;
//     final static int OVULATION_PREDICTED = 5;
//     final static int FERTILITY_FUTURE = 6;
//     final static int OVULATION_FUTURE = 7;
//     final static int INFERTILE_PREDICTED = 8;
//     final static int INFERTILE_FUTURE = 9;
//     int type;
//     final GregorianCalendarExt date;
//     int dayofcycle;
//     int intensity;
//     String notes;
//     List<Integer> symptoms;
// 
//     /**
//      * Construct a new day entry with parameters
//      *
//      * @param type       Entry type (DayEntry.EMPTY, DayEntry.PERIOD_START, DayEntry.PERIOD_CONFIRMED, ...)
//      * @param date       Entry date
//      * @param dayofcycle Day within current cycle (beginning with 1)
//      * @param intensity  Intensity of the period (1-4)
//      */
//     DayEntry(int type, GregorianCalendar date, int dayofcycle, int intensity) {
//         this.type = type;
//         this.date = new GregorianCalendarExt();
//         this.date.setTime(date.getTime());
//         this.dayofcycle = dayofcycle;
//         this.intensity = intensity;
//         this.notes = "";
//         this.symptoms = new ArrayList<>();
//     }
// 
//     /**
//      * Construct a new day entry
//      */
//     DayEntry() {
//         this.type = EMPTY;
//         this.date = new GregorianCalendarExt();
//         this.dayofcycle = 0;
//         this.intensity = 1;
//         this.notes = "";
//         this.symptoms = new ArrayList<>();
//     }
// }


// Path: app/src/main/java/de/arnowelzel/android/periodical/CalendarCell.java
import android.annotation.SuppressLint;
import android.text.format.DateUtils;
import de.arnowelzel.android.periodical.PeriodicalDatabase.DayEntry;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;
import android.widget.Button;

    private final Bitmap bitmapIntercourse;
    /**
     * Bitmap for entries with flag "intercourse" (black variant)
     */
    private final Bitmap bitmapIntercourseBlack;
    /**
     * Bitmap for entries with flag "notes"
     */
    private final Bitmap bitmapNotes;
    /**
     * Bitmap for entries with flag "notes" (black variant)
     */
    private final Bitmap bitmapNotesBlack;
    /**
     * Paint for bitmaps
     */
    private final Paint paintBitmap;

    /* Current view orientation (portrait, landscape) */
    private int orientation;

    /**
     * Constructor
     *
     * @param context Application context
     * @param attrs   Resource attributes
     */
    public CalendarCell(Context context, AttributeSet attrs) {
        super(context, attrs);

        type = DayEntry.EMPTY;