From 4a2d0298ab2caa3d62cfbd54c0071ae47eb89ccf Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 11 Apr 2026 02:27:51 +0000 Subject: Four features: outbound link markers, offline content, log text/photo, departure picker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Learn tab - ic_open_in_new.xml: external link icon (box + arrow) applied to all browser-opening cards - Migration guide cards retain internal › chevron; ASA/Flashcards cards show ↗ icon - New REFERENCE section (offline, works without connectivity): - ColRegs Rules of the Road → colregs_reference.md (rules 1–38, lights table, sound signals, day shapes, memory aids) - Sailing Quick Reference → sailing_reference.md (points of sail, Beaufort scale, nav lights, knots, buoyage IALA-B, VHF channels, distress signals, tide rule of 12) - ColRegs card moved from external ASA section to offline REFERENCE section Log entry - LogEntry: add photoPath field (absolute file path or content URI string) - VoiceLogViewModel: replace confirmAndSave() with save(text, photoPath?) so the fragment controls text (user may edit recognized speech before saving) - VoiceLogFragment: redesigned layout with EditText (editable, voice fills it), camera button (TakePicturePreview → JPEG in cacheDir), gallery button (GetContent), photo thumbnail with remove button, Save / Clear row - Manifest: add android.hardware.camera uses-feature (required=false) Departure date/time picker (trip planning) - ic_calendar.xml: calendar icon for the picker button - PreTripReportViewModel: _departureMs StateFlow (default = now), setDeparture(ms) - PreTripReportGenerator.generateReport(): departureDateTimeMs param; findDepartureSlot() matches nearest UTC forecast item; condition window labels show actual local times (e.g. "2 PM") when departure is not near-now; buildWatchList uses departure hour for Kona trades warning instead of system clock - fragment_pretrip_report.xml: DEPART card with label + calendar button above generate - PreTripReportFragment: MaterialDatePicker (future dates only) → MaterialTimePicker chain; auto-regenerates after picker confirms https://claude.ai/code/session_01HXPjBsogsJVRwCiekDGkJX --- .../app/src/main/res/drawable/ic_calendar.xml | 44 ++++ .../app/src/main/res/drawable/ic_open_in_new.xml | 30 +++ .../app/src/main/res/layout/fragment_learn.xml | 226 ++++++++++++++++----- .../main/res/layout/fragment_pretrip_report.xml | 52 +++++ .../app/src/main/res/layout/fragment_voice_log.xml | 142 ++++++++++--- 5 files changed, 409 insertions(+), 85 deletions(-) create mode 100644 android-app/app/src/main/res/drawable/ic_calendar.xml create mode 100644 android-app/app/src/main/res/drawable/ic_open_in_new.xml (limited to 'android-app/app/src/main/res') diff --git a/android-app/app/src/main/res/drawable/ic_calendar.xml b/android-app/app/src/main/res/drawable/ic_calendar.xml new file mode 100644 index 0000000..dd8030c --- /dev/null +++ b/android-app/app/src/main/res/drawable/ic_calendar.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + diff --git a/android-app/app/src/main/res/drawable/ic_open_in_new.xml b/android-app/app/src/main/res/drawable/ic_open_in_new.xml new file mode 100644 index 0000000..4645522 --- /dev/null +++ b/android-app/app/src/main/res/drawable/ic_open_in_new.xml @@ -0,0 +1,30 @@ + + + + + + + + diff --git a/android-app/app/src/main/res/layout/fragment_learn.xml b/android-app/app/src/main/res/layout/fragment_learn.xml index f41e577..8813ba2 100644 --- a/android-app/app/src/main/res/layout/fragment_learn.xml +++ b/android-app/app/src/main/res/layout/fragment_learn.xml @@ -96,11 +96,11 @@ - + + android:orientation="horizontal" + android:padding="16dp" + android:gravity="center_vertical"> - + android:layout_weight="1" + android:orientation="vertical"> + + + + + + + android:text="›" + android:textSize="20sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + android:orientation="horizontal" + android:padding="16dp" + android:gravity="center_vertical"> - + android:layout_weight="1" + android:orientation="vertical"> + + + + + + + android:text="›" + android:textSize="20sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + + + android:orientation="horizontal" + android:padding="16dp" + android:gravity="center_vertical"> - + android:layout_weight="1" + android:orientation="vertical"> + + + + + + + + - + + + + + + + + android:layout_weight="1" + android:orientation="vertical"> + + + + + + + + @@ -211,22 +317,38 @@ - - + android:orientation="horizontal" + android:padding="16dp" + android:gravity="center_vertical"> - + android:layout_weight="1" + android:orientation="vertical"> + + + + + + + + diff --git a/android-app/app/src/main/res/layout/fragment_pretrip_report.xml b/android-app/app/src/main/res/layout/fragment_pretrip_report.xml index 510411b..8cb094a 100644 --- a/android-app/app/src/main/res/layout/fragment_pretrip_report.xml +++ b/android-app/app/src/main/res/layout/fragment_pretrip_report.xml @@ -54,6 +54,58 @@ + + + + + + + + + + + + + + + + + + + android:padding="20dp"> - + + android:layout_marginBottom="12dp" + style="@style/Widget.Material3.TextInputLayout.OutlinedBox"> + + + + + + + + + + + + + + + + + -