pCalendar guide

The full reference. For an overview, see the README. A tiny, fast, dependency-free Android organizer combining Calendar, Notes, and ToDo into a single cohesive app. Built exclusively with the Android framework and the Kotlin standard library — no external libraries, jetpack dependencies, or bloated runtimes.

The release APK is ~87 KB (minified and resource-shrunk).

Features

Calendar

Notes

ToDo

General

Storage

All data is stored locally in the app's internal storage (context.filesDir) with atomic writes using android.util.AtomicFile or file replacements to prevent data corruption:

FileFormatDescription
files/notes.tsvTab-Separated Values (YYYYMMDD\ttext)Calendar events per day. Retains full backwards compatibility with earlier pCalendar releases.
files/notes.jsonJSON array of {id, title, body, updated}Standalone notes.
files/todos.jsonJSON array of {id, text, done, due, created, completedAt}ToDo tasks. due is represented as civil epoch days (days since 1970-01-01), unaffected by timezone shifts.

Widgets

Architecture

Structure

app/src/main/
├── AndroidManifest.xml
├── java/x/vladgba/calendar/
│   ├── CalendarSection.kt        # Calendar screen (month header, canvas grid, day list)
│   ├── CalendarWidget.kt         # Calendar home-screen widget
│   ├── EventStore.kt             # TSV storage for day events (notes.tsv)
│   ├── MainActivity.kt           # App shell, tab navigation, edge-to-edge
│   ├── MonthView.kt              # Custom Canvas view for month grid
│   ├── Ui.kt                     # Section interface and shared UI helpers
│   ├── notes/
│   │   ├── EditActivity.kt       # Dedicated note editor activity
│   │   ├── Insets.kt             # Window insets utility for notes
│   │   ├── Note.kt               # Note data model
│   │   ├── NotesSection.kt       # Notes list section view
│   │   ├── NoteStore.kt          # JSON storage for notes (notes.json)
│   │   ├── NoteWidget.kt         # Note app widget provider
│   │   ├── NoteWidgetService.kt  # RemoteViewsService for note widget
│   │   └── WidgetConfigActivity.kt # Note selection screen for widget
│   └── todo/
│       ├── Todo.kt               # Task model and TodoDates civil date helpers
│       ├── TodoEditor.kt         # Dialog task editor with DatePickerDialog
│       ├── TodoSection.kt        # ToDo section view with task list & clear action
│       └── TodoStore.kt          # JSON storage for tasks (todos.json)
└── res/
    ├── drawable/                 # Widget cell styles, icons, backgrounds
    ├── drawable-v23/             # Layer-list drawables for API 23+
    ├── layout/                   # Layouts for Note section and both widgets
    ├── values/                   # colors.xml, strings.xml, themes.xml
    ├── values-night/             # Dark theme overrides (colors.xml, themes.xml)
    └── xml/                      # widget_info.xml, note_widget_info.xml

Build

# Debug APK: app/build/outputs/apk/debug/app-debug.apk
./gradlew assembleDebug

# Release APK (minified + shrunk): app/build/outputs/apk/release/app-release-unsigned.apk
./gradlew assembleRelease

# Lint verification:
./gradlew lintDebug

Requirements: