diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-06-30 17:16:06 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-06-30 18:19:04 +0000 |
| commit | 9af38934e8d676bfb8c08ab01e3d57fec5f36d97 (patch) | |
| tree | 67b5bdfffb596d63fb39d17465704bb97ad6bf8a /android-app/app/src/main/res/layout | |
| parent | 36efb5a8b9502d0def41c0cdc17ed894744c8562 (diff) | |
feat: UX improvements + HAW FAD data + fishing mode plan
Dark mode:
- Force light mode (AppCompatDelegate.MODE_NIGHT_NO) in NavApplication
Log screen:
- Tracks sorted newest-first (sortedByDescending startMs)
- Photos/entries saved during a track tagged with trackId; ship's log
shows only standalone entries (trackId == null)
- "Plan Trip" button moved from safety screen to log screen header row
- Pre-trip report auto-generates (newAutoInstance) when a track starts
Safety screen:
- Removed "Plan Trip" button (now in log screen)
- Quit button moved to top title row
- Anchor Watch section collapses by default (tap header to expand)
- Hardware Data Sources section collapses by default (tap header to expand)
Notifications + idle:
- Tracking notification becomes persistent (setOngoing true) while recording
- Notification title changes to "Recording track" when active
- App exits automatically after 3 hours of idle (resetIdleTimer via
onUserInteraction + onResume; suspended while recording)
FAD layer:
- FadData.kt: 18 Hawaii Island DLNR FAD coordinates hardcoded
(source: DLNR Division of Aquatic Resources 6/14/07)
- FAD GeoJSON populated on style load from static data
Fishing mode plan:
- docs/superpowers/plans/2026-06-30-fishing-mode.md: 7-task plan for
RigAdvisor, SST tiles, FishingModeManager, FishingOverlayView, steering
bearing line, and FAB integration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'android-app/app/src/main/res/layout')
| -rw-r--r-- | android-app/app/src/main/res/layout/fragment_safety.xml | 522 | ||||
| -rw-r--r-- | android-app/app/src/main/res/layout/fragment_voice_log.xml | 31 |
2 files changed, 315 insertions, 238 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 index 1d499ab..420ccef 100644 --- a/android-app/app/src/main/res/layout/fragment_safety.xml +++ b/android-app/app/src/main/res/layout/fragment_safety.xml @@ -1,335 +1,395 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.core.widget.NestedScrollView + 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" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="24dp" - app:cardCornerRadius="16dp" - app:layout_constraintTop_toBottomOf="@id/safety_title"> + android:orientation="vertical" + android:padding="24dp"> + <!-- ── Title row ── --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="16dp" - android:gravity="center"> + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="24dp"> <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="Safety Dashboard" + android:textSize="24sp" + android:textStyle="bold" + android:textColor="?attr/colorOnSurface" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/button_quit" + style="@style/Widget.Material3.Button.TextButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="MAN OVERBOARD" - android:textColor="@color/md_theme_error" - android:textStyle="bold" /> + android:text="Quit" + android:textColor="?attr/colorOnSurfaceVariant" + app:icon="@drawable/ic_close" /> <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" /> + 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" /> </LinearLayout> - </com.google.android.material.card.MaterialCardView> - - <!-- CPA / Collision Alert Section --> - <com.google.android.material.card.MaterialCardView - android:id="@+id/card_cpa" - 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 + <!-- MOB Section --> + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_mob" 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="COLLISION AVOIDANCE" - android:textStyle="bold" /> + android:layout_marginBottom="16dp" + app:cardCornerRadius="16dp"> - <TextView - android:id="@+id/tv_cpa_status" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:text="No traffic alerts" - android:textColor="?attr/colorOnSurfaceVariant" - android:fontFamily="monospace" - android:textSize="13sp" /> + android:orientation="vertical" + android:padding="16dp" + android:gravity="center"> - </LinearLayout> + <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" /> - </com.google.android.material.card.MaterialCardView> + </LinearLayout> - <!-- 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_cpa"> + </com.google.android.material.card.MaterialCardView> - <LinearLayout + <!-- CPA / Collision Alert Section --> + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_cpa" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="16dp"> + android:layout_marginBottom="16dp" + app:cardCornerRadius="16dp"> - <TextView - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="ANCHOR WATCH" - android:textStyle="bold" /> + android:orientation="vertical" + android:padding="16dp"> - <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" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="COLLISION AVOIDANCE" + android:textStyle="bold" /> + + <TextView + android:id="@+id/tv_cpa_status" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="No traffic alerts" + android:textColor="?attr/colorOnSurfaceVariant" + android:fontFamily="monospace" + android:textSize="13sp" /> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> + + <!-- Anchor Section (collapsible) --> + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_anchor" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + app:cardCornerRadius="16dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_marginTop="16dp"> + android:orientation="vertical" + android:padding="16dp"> + <!-- Collapsible header --> <LinearLayout - android:layout_width="0dp" + android:id="@+id/header_anchor" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:layout_marginEnd="8dp"> + android:orientation="horizontal" + android:gravity="center_vertical" + android:clickable="true" + android:focusable="true"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="ANCHOR WATCH" + android:textStyle="bold" /> <TextView + android:id="@+id/tv_anchor_chevron" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/anchor_depth_label" + android:text="▶" android:textSize="12sp" android:textColor="?attr/colorOnSurfaceVariant" /> - <EditText - android:id="@+id/et_anchor_depth" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:hint="@string/anchor_depth_hint" - android:inputType="numberDecimal" - android:importantForAutofill="no" /> - </LinearLayout> + <!-- Collapsible body — hidden by default --> <LinearLayout - android:layout_width="0dp" + android:id="@+id/body_anchor" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" android:orientation="vertical" - android:layout_marginStart="8dp"> + android:visibility="gone"> <TextView + android:id="@+id/anchor_status_summary" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/anchor_rode_label" - android:textSize="12sp" + android:layout_marginTop="8dp" + android:text="Status: Inactive" android:textColor="?attr/colorOnSurfaceVariant" /> - <EditText - android:id="@+id/et_anchor_rode" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="@string/anchor_rode_hint" - android:inputType="numberDecimal" - android:importantForAutofill="no" /> - - </LinearLayout> - - </LinearLayout> + android:orientation="horizontal" + android:layout_marginTop="16dp"> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:layout_marginEnd="8dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/anchor_depth_label" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <EditText + android:id="@+id/et_anchor_depth" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/anchor_depth_hint" + android:inputType="numberDecimal" + android:importantForAutofill="no" /> + + </LinearLayout> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:layout_marginStart="8dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/anchor_rode_label" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <EditText + android:id="@+id/et_anchor_rode" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/anchor_rode_hint" + android:inputType="numberDecimal" + android:importantForAutofill="no" /> + + </LinearLayout> + + </LinearLayout> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="12dp" - android:text="@string/anchor_suggested_radius_label" - android:textSize="12sp" - android:textColor="?attr/colorOnSurfaceVariant" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="12dp" + android:text="@string/anchor_suggested_radius_label" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" /> - <TextView - android:id="@+id/tv_anchor_suggested_radius" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="2dp" - android:text="@string/anchor_suggested_radius_empty" - android:textSize="16sp" - android:textStyle="bold" - android:textColor="?attr/colorOnSurface" /> + <TextView + android:id="@+id/tv_anchor_suggested_radius" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="2dp" + android:text="@string/anchor_suggested_radius_empty" + android:textSize="16sp" + android:textStyle="bold" + android:textColor="?attr/colorOnSurface" /> - </LinearLayout> + </LinearLayout> - </com.google.android.material.card.MaterialCardView> + </LinearLayout> - <!-- Hardware Data Sources --> - <com.google.android.material.card.MaterialCardView - android:id="@+id/card_data_sources" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="16dp" - app:cardCornerRadius="16dp" - app:layout_constraintTop_toBottomOf="@id/card_anchor"> + </com.google.android.material.card.MaterialCardView> - <LinearLayout + <!-- Hardware Data Sources (collapsible) --> + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_data_sources" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="16dp"> + android:layout_marginBottom="16dp" + app:cardCornerRadius="16dp"> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="HARDWARE DATA SOURCES" - android:textStyle="bold" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="4dp" - android:layout_marginBottom="12dp" - android:text="Enable only the hardware you have connected" - android:textSize="12sp" - android:textColor="?attr/colorOnSurfaceVariant" /> - - <!-- AIS Receiver row --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="center_vertical" - android:layout_marginBottom="8dp"> + android:orientation="vertical" + android:padding="16dp"> + <!-- Collapsible header --> <LinearLayout - android:layout_width="0dp" + android:id="@+id/header_sources" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical"> + android:orientation="horizontal" + android:gravity="center_vertical" + android:clickable="true" + android:focusable="true"> <TextView - android:layout_width="wrap_content" + android:layout_width="0dp" android:layout_height="wrap_content" - android:text="AIS Receiver" - android:textSize="15sp" - android:textColor="?attr/colorOnSurface" /> + android:layout_weight="1" + android:text="HARDWARE DATA SOURCES" + android:textStyle="bold" /> <TextView + android:id="@+id/tv_sources_chevron" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Vessel tracking, collision alerts" + android:text="▶" android:textSize="12sp" android:textColor="?attr/colorOnSurfaceVariant" /> </LinearLayout> - <com.google.android.material.materialswitch.MaterialSwitch - android:id="@+id/switch_ais" - android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - - </LinearLayout> - - <!-- NMEA Instruments row --> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="center_vertical"> - + <!-- Collapsible body — hidden by default --> <LinearLayout - android:layout_width="0dp" + android:id="@+id/body_sources" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="NMEA Instruments" - android:textSize="15sp" - android:textColor="?attr/colorOnSurface" /> + android:orientation="vertical" + android:visibility="gone"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Wind, depth, boat speed" + android:layout_marginTop="4dp" + android:layout_marginBottom="12dp" + android:text="Enable only the hardware you have connected" android:textSize="12sp" android:textColor="?attr/colorOnSurfaceVariant" /> - </LinearLayout> + <!-- AIS Receiver row --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="8dp"> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="AIS Receiver" + android:textSize="15sp" + android:textColor="?attr/colorOnSurface" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Vessel tracking, collision alerts" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + </LinearLayout> + + <com.google.android.material.materialswitch.MaterialSwitch + android:id="@+id/switch_ais" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + </LinearLayout> + + <!-- NMEA Instruments row --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical"> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="NMEA Instruments" + android:textSize="15sp" + android:textColor="?attr/colorOnSurface" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Wind, depth, boat speed" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + </LinearLayout> + + <com.google.android.material.materialswitch.MaterialSwitch + android:id="@+id/switch_nmea" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + </LinearLayout> - <com.google.android.material.materialswitch.MaterialSwitch - android:id="@+id/switch_nmea" - android:layout_width="wrap_content" - android:layout_height="wrap_content" /> + </LinearLayout> </LinearLayout> - </LinearLayout> + </com.google.android.material.card.MaterialCardView> - </com.google.android.material.card.MaterialCardView> - - <com.google.android.material.button.MaterialButton - android:id="@+id/button_plan_trip" - style="@style/Widget.Material3.Button.TonalButton" - android:layout_width="match_parent" - android:layout_height="60dp" - android:layout_marginTop="24dp" - android:text="PLAN TRIP (PRE-TRIP REPORT)" - app:layout_constraintTop_toBottomOf="@id/card_data_sources" /> - - <com.google.android.material.button.MaterialButton - android:id="@+id/button_quit" - style="@style/Widget.Material3.Button.TextButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Quit" - android:textColor="?attr/colorOnSurfaceVariant" - app:icon="@drawable/ic_close" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + </LinearLayout> -</androidx.constraintlayout.widget.ConstraintLayout> +</androidx.core.widget.NestedScrollView> diff --git a/android-app/app/src/main/res/layout/fragment_voice_log.xml b/android-app/app/src/main/res/layout/fragment_voice_log.xml index 346ba81..b1c440c 100644 --- a/android-app/app/src/main/res/layout/fragment_voice_log.xml +++ b/android-app/app/src/main/res/layout/fragment_voice_log.xml @@ -189,15 +189,32 @@ android:layout_marginBottom="16dp" /> <!-- ── Trips section ── --> - <TextView + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="Trips" - android:textSize="13sp" - android:textAllCaps="true" - android:letterSpacing="0.08" - android:textColor="?attr/colorOnSurfaceVariant" - android:layout_marginBottom="8dp" /> + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="8dp"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="Trips" + android:textSize="13sp" + android:textAllCaps="true" + android:letterSpacing="0.08" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_plan_trip" + style="@style/Widget.Material3.Button.TextButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Plan Trip" + android:textSize="12sp" /> + + </LinearLayout> <!-- Empty state --> <LinearLayout |
