From 77892d354eda07d98e2dfa5d00fca1ed1f808d8b Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Mon, 23 Mar 2026 04:16:32 +0000 Subject: feat: refactor UI to BottomNavigationView with Safety and Doc fragments Replace FAB-based navigation with a 4-tab BottomNavigationView (Map, Instruments, Log, Safety). Instruments use a collapsible bottom sheet; Log and Safety display as full-screen overlay fragments. - Add SafetyFragment with MOB and Anchor Watch controls - Add DocFragment for in-app markdown help (Markwon: core, tables, images) - Add layout_instruments_sheet with 3x3 instrument grid and PolarDiagramView - Add fragment_safety and fragment_doc layouts - Add vector drawables: ic_map, ic_instruments, ic_log, ic_safety, ic_close - Update activity_main.xml to CoordinatorLayout with bottom sheet + overlay - Fix: set isHideable=true before STATE_HIDDEN to avoid silent no-op from behavior_hideable=false default; restore false on Map/Instruments tabs Co-Authored-By: Claude Sonnet 4.6 --- android-app/app/src/main/res/drawable/ic_close.xml | 10 + .../app/src/main/res/drawable/ic_instruments.xml | 9 + android-app/app/src/main/res/drawable/ic_log.xml | 9 + android-app/app/src/main/res/drawable/ic_map.xml | 9 + .../app/src/main/res/drawable/ic_safety.xml | 9 + .../app/src/main/res/layout/activity_main.xml | 550 ++------------------- .../app/src/main/res/layout/fragment_doc.xml | 36 ++ .../app/src/main/res/layout/fragment_safety.xml | 107 ++++ .../main/res/layout/layout_instruments_sheet.xml | 166 +++++++ .../app/src/main/res/menu/bottom_nav_menu.xml | 18 +- android-app/app/src/main/res/values/colors.xml | 57 ++- android-app/app/src/main/res/values/themes.xml | 81 +-- 12 files changed, 485 insertions(+), 576 deletions(-) create mode 100644 android-app/app/src/main/res/drawable/ic_close.xml create mode 100644 android-app/app/src/main/res/drawable/ic_instruments.xml create mode 100644 android-app/app/src/main/res/drawable/ic_log.xml create mode 100644 android-app/app/src/main/res/drawable/ic_map.xml create mode 100644 android-app/app/src/main/res/drawable/ic_safety.xml create mode 100644 android-app/app/src/main/res/layout/fragment_doc.xml create mode 100644 android-app/app/src/main/res/layout/fragment_safety.xml create mode 100644 android-app/app/src/main/res/layout/layout_instruments_sheet.xml (limited to 'android-app/app/src/main/res') diff --git a/android-app/app/src/main/res/drawable/ic_close.xml b/android-app/app/src/main/res/drawable/ic_close.xml new file mode 100644 index 0000000..16d6d37 --- /dev/null +++ b/android-app/app/src/main/res/drawable/ic_close.xml @@ -0,0 +1,10 @@ + + + diff --git a/android-app/app/src/main/res/drawable/ic_instruments.xml b/android-app/app/src/main/res/drawable/ic_instruments.xml new file mode 100644 index 0000000..9ba6fad --- /dev/null +++ b/android-app/app/src/main/res/drawable/ic_instruments.xml @@ -0,0 +1,9 @@ + + + diff --git a/android-app/app/src/main/res/drawable/ic_log.xml b/android-app/app/src/main/res/drawable/ic_log.xml new file mode 100644 index 0000000..cd3a27c --- /dev/null +++ b/android-app/app/src/main/res/drawable/ic_log.xml @@ -0,0 +1,9 @@ + + + diff --git a/android-app/app/src/main/res/drawable/ic_map.xml b/android-app/app/src/main/res/drawable/ic_map.xml new file mode 100644 index 0000000..d17e9cd --- /dev/null +++ b/android-app/app/src/main/res/drawable/ic_map.xml @@ -0,0 +1,9 @@ + + + diff --git a/android-app/app/src/main/res/drawable/ic_safety.xml b/android-app/app/src/main/res/drawable/ic_safety.xml new file mode 100644 index 0000000..8d4477d --- /dev/null +++ b/android-app/app/src/main/res/drawable/ic_safety.xml @@ -0,0 +1,9 @@ + + + diff --git a/android-app/app/src/main/res/layout/activity_main.xml b/android-app/app/src/main/res/layout/activity_main.xml index 54ad0cd..c841fc3 100644 --- a/android-app/app/src/main/res/layout/activity_main.xml +++ b/android-app/app/src/main/res/layout/activity_main.xml @@ -1,330 +1,57 @@ - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_marginBottom="56dp"> - - - + - - - - - - - - - - - - + + - + + app:behavior_hideable="false" + app:behavior_peekHeight="120dp" + app:cardElevation="16dp" + app:cardCornerRadius="24dp" + app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"> - + - - + + + + android:layout_gravity="bottom" + android:background="?attr/colorSurface" + app:menu="@menu/bottom_nav_menu" /> + - - - - - - - - - - -