diff options
Diffstat (limited to 'android-app/SESSION_STATE.md')
| -rw-r--r-- | android-app/SESSION_STATE.md | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/android-app/SESSION_STATE.md b/android-app/SESSION_STATE.md index f1c9edc..6d1b5d3 100644 --- a/android-app/SESSION_STATE.md +++ b/android-app/SESSION_STATE.md @@ -1,32 +1,36 @@ # SESSION_STATE.md ## Current Task Goal -Add VoiceLogFragment with SpeechRecognizer integration to the sailing companion Android app. +BottomNavigationView UI refactor — replace FAB-based navigation with 4-tab bottom nav (Map, Instruments, Log, Safety) ## Status: [APPROVED] ## Completed Items - [APPROVED] Add RECORD_AUDIO permission to AndroidManifest.xml -- [APPROVED] Create logbook data layer stubs: - - `app/src/main/kotlin/org/terst/nav/logbook/LogEntry.kt` - - `app/src/main/kotlin/org/terst/nav/logbook/VoiceLogState.kt` (sealed class: Idle, Listening, Result, Saved, Error) - - `app/src/main/kotlin/org/terst/nav/logbook/VoiceLogViewModel.kt` - - `app/src/main/kotlin/org/terst/nav/logbook/InMemoryLogbookRepository.kt` -- [APPROVED] Create `app/src/main/res/layout/fragment_voice_log.xml` -- [APPROVED] Create `app/src/main/kotlin/org/terst/nav/ui/voicelog/VoiceLogFragment.kt` -- [APPROVED] Add voice log FAB (`fab_voice_log`) and fragment container (`voice_log_container`) to `activity_main.xml` -- [APPROVED] Wire VoiceLogFragment into MainActivity via FAB toggle +- [APPROVED] Create VoiceLogFragment + logbook data layer (LogEntry, VoiceLogState, VoiceLogViewModel, InMemoryLogbookRepository) +- [APPROVED] BottomNavigationView refactor: + - `activity_main.xml` — CoordinatorLayout with MapView, fragment_container overlay, instrument bottom sheet (CardView), BottomNavigationView, MOB FAB + - `bottom_nav_menu.xml` — 4 tabs: nav_map, nav_instruments, nav_log, nav_safety + - `colors.xml` — M3 color palette, instrument/night-vision colors + - `themes.xml` — Theme.Nav (M3), Theme.Nav.NightVision, InstrumentLabel/PrimaryValue/Card styles + - `layout_instruments_sheet.xml` — 3×3 GridLayout (AWS, HDG, BSP, TWS, COG, SOG, VMG, Depth, Polar%), barometer, PolarDiagramView + - `fragment_safety.xml` — MOB card, Anchor Watch card with status + - `fragment_doc.xml` — AppBarLayout + MaterialToolbar + NestedScrollView + TextView for Markwon + - `ic_map.xml`, `ic_instruments.xml`, `ic_log.xml`, `ic_safety.xml`, `ic_close.xml` — vector drawables + - `ui/safety/SafetyFragment.kt` — MOB button, Anchor Watch button, SafetyListener interface, updateAnchorStatus() + - `ui/doc/DocFragment.kt` — loads markdown from assets via Markwon (core + tables + images) + - `MainActivity.kt` — setupBottomNavigation(), showOverlay()/hideOverlays(), SafetyFragment.SafetyListener impl + - `build.gradle` — added Markwon dependencies (core, ext-tables, image) + - Fixed: isHideable toggled to true before STATE_HIDDEN (was false from XML behavior_hideable="false") -## Navigation Integration Note -The existing app uses a single-activity design (no BottomNavigationView). VoiceLogFragment is integrated via: -- A FAB (`fab_voice_log`) positioned above `fab_tidal` on the right side -- A `FrameLayout` (`voice_log_container`) covering the full screen, initially `GONE` -- FAB click shows/hides the container and adds/pops VoiceLogFragment on the FragmentManager back stack - -## Package Adaptation -Task instructions referenced `com.example.androidapp` package but the actual sailing companion uses `org.terst.nav`. All files were created with the correct package. +## Navigation Integration +- Single-activity with fragment overlay (fragment_container) for Log/Safety tabs +- Instruments tab expands the bottom sheet; Map tab collapses it to peek height +- MOB FAB is always visible (anchored above BottomNav, left side) +- Safety fragment reused as persistent instance to preserve anchor watch state updates ## Next Steps -- N/A (task complete) -- Future: Persist logbook entries to a Room database instead of in-memory storage -- Future: Classify entry type from speech text rather than defaulting to GENERAL +- Future: Persist logbook entries to a Room database +- Future: AnchorWatchHandler UI wired into SafetyFragment (currently stub fallback views) +- Future: CPA/TCPA alarms in ViewModel +- Future: AISHub periodic polling on timer |
