// Path: app/src/main/java/de/arnowelzel/android/periodical/PeriodicalDatabase.java
// final static int PERIOD_CONFIRMED = 2;
// 
// Path: app/src/main/java/de/arnowelzel/android/periodical/PeriodicalDatabase.java
// final static int PERIOD_START = 1;


import android.app.backup.BackupManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatCheckBox;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.MenuItem;
import android.view.View;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.MultiAutoCompleteTextView;
import android.widget.RadioButton;
import android.widget.TextView;
import java.text.DateFormat;
import java.util.Locale;
import static de.arnowelzel.android.periodical.PeriodicalDatabase.DayEntry.PERIOD_CONFIRMED;
import static de.arnowelzel.android.periodical.PeriodicalDatabase.DayEntry.PERIOD_START;
        // Set up view
        setContentView(R.layout.activity_details);

        // Activate "back button" in Action Bar
        ActionBar actionBar = getSupportActionBar();
        assert actionBar != null;
        actionBar.setDisplayHomeAsUpEnabled(true);

        // Get details
        Intent intent = getIntent();
        int year = intent.getIntExtra("year", 1970);
        int month = intent.getIntExtra("month", 1);
        int day = intent.getIntExtra("day", 1);

        dbMain = new PeriodicalDatabase(context);
        dbMain.loadCalculatedData();
        entry = dbMain.getEntryWithDetails(year, month, day);

        // Set header using the entry date
        DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.LONG);
        ((TextView) findViewById(R.id.labelDetailsHeader)).setText(
                String.format("%s", dateFormat.format(entry.date.getTime())));

        // Set period status
        RadioButton buttonPeriodYes = findViewById(R.id.periodYes);
        RadioButton buttonPeriodNo = findViewById(R.id.periodNo);
        boolean intensityEnabled = false;

        switch (entry.type) {
            case PERIOD_START:
// Path: app/src/main/java/de/arnowelzel/android/periodical/PeriodicalDatabase.java
// final static int PERIOD_CONFIRMED = 2;
// 
// Path: app/src/main/java/de/arnowelzel/android/periodical/PeriodicalDatabase.java
// final static int PERIOD_START = 1;


// Path: app/src/main/java/de/arnowelzel/android/periodical/DetailsActivity.java
import android.app.backup.BackupManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatCheckBox;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.MenuItem;
import android.view.View;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.MultiAutoCompleteTextView;
import android.widget.RadioButton;
import android.widget.TextView;
import java.text.DateFormat;
import java.util.Locale;
import static de.arnowelzel.android.periodical.PeriodicalDatabase.DayEntry.PERIOD_CONFIRMED;
import static de.arnowelzel.android.periodical.PeriodicalDatabase.DayEntry.PERIOD_START;

        // Set up view
        setContentView(R.layout.activity_details);

        // Activate "back button" in Action Bar
        ActionBar actionBar = getSupportActionBar();
        assert actionBar != null;
        actionBar.setDisplayHomeAsUpEnabled(true);

        // Get details
        Intent intent = getIntent();
        int year = intent.getIntExtra("year", 1970);
        int month = intent.getIntExtra("month", 1);
        int day = intent.getIntExtra("day", 1);

        dbMain = new PeriodicalDatabase(context);
        dbMain.loadCalculatedData();
        entry = dbMain.getEntryWithDetails(year, month, day);

        // Set header using the entry date
        DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.LONG);
        ((TextView) findViewById(R.id.labelDetailsHeader)).setText(
                String.format("%s", dateFormat.format(entry.date.getTime())));

        // Set period status
        RadioButton buttonPeriodYes = findViewById(R.id.periodYes);
        RadioButton buttonPeriodNo = findViewById(R.id.periodNo);
        boolean intensityEnabled = false;

        switch (entry.type) {
            case PERIOD_START:
            case PERIOD_CONFIRMED: