diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-23 04:16:32 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-23 04:16:32 +0000 |
| commit | 77892d354eda07d98e2dfa5d00fca1ed1f808d8b (patch) | |
| tree | 53c05f944d616eef5cbc3ee667ad6beb18665d23 /android-app/app/src/main/res/layout/fragment_safety.xml | |
| parent | f024a6a1cbcb68395fe1a15d4ac852c2be2416e6 (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'android-app/app/src/main/res/layout/fragment_safety.xml')
| -rw-r--r-- | android-app/app/src/main/res/layout/fragment_safety.xml | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/android-app/app/src/main/res/layout/fragment_safety.xml b/android-app/app/src/main/res/layout/fragment_safety.xml new file mode 100644 index 0000000..5b2397e --- /dev/null +++ b/android-app/app/src/main/res/layout/fragment_safety.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="24dp" + android:background="?attr/colorSurface"> + + <TextView + android:id="@+id/safety_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Safety Dashboard" + android:textSize="24sp" + android:textStyle="bold" + android:textColor="?attr/colorOnSurface" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/button_help_safety" + style="@style/Widget.Material3.Button.TextButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="HELP" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> + + <!-- MOB Section --> + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_mob" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="24dp" + app:cardCornerRadius="16dp" + app:layout_constraintTop_toBottomOf="@id/safety_title"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp" + android:gravity="center"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="MAN OVERBOARD" + android:textColor="@color/md_theme_error" + android:textStyle="bold" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/button_mob_activate" + android:layout_width="match_parent" + android:layout_height="80dp" + android:layout_marginTop="16dp" + android:text="ACTIVATE MOB" + android:textSize="20sp" + app:backgroundTint="@color/md_theme_error" /> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> + + <!-- Anchor Section --> + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_anchor" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + app:cardCornerRadius="16dp" + app:layout_constraintTop_toBottomOf="@id/card_mob"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="ANCHOR WATCH" + android:textStyle="bold" /> + + <TextView + android:id="@+id/anchor_status_summary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="Status: Inactive" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/button_anchor_config" + style="@style/Widget.Material3.Button.TonalButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:text="CONFIGURE ANCHOR WATCH" /> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> + +</androidx.constraintlayout.widget.ConstraintLayout> |
