summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/res/layout/activity_main.xml
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-04-23 23:10:11 +0000
committerClaude <noreply@anthropic.com>2026-04-23 23:10:11 +0000
commite1db9200e9d44c10450361cc8984a45b2eda87b7 (patch)
tree21bdfca02491e6ff4cde7a22673c821c0a03e108 /android-app/app/src/main/res/layout/activity_main.xml
parent55509f579b4d074f01237dd90791b6d25aaec3cd (diff)
parenteb78d317c722234a7ef2c501c68c9aa730ec2758 (diff)
Merge origin/main — unite all work onto one branch
Brings in dev log (NavLogger), UnitPrefs, MapLayerManager, HUD views, conditions throttling, track save/load pipeline, improved ParticleWindView (antimeridian-aware, dynamic particle count), Snackbar error surfacing, and all other main-branch work from the prior session. Combined with master's hardware source flags, vessel registry, crew management, thermal alarm, CPA collision alerts, and track stats. Also documents primary branch policy in CLAUDE.md and .agent/config.md: all work merges to main, never master. https://claude.ai/code/session_011h2dXbgXg3PesQMmQUNTCW
Diffstat (limited to 'android-app/app/src/main/res/layout/activity_main.xml')
-rw-r--r--android-app/app/src/main/res/layout/activity_main.xml169
1 files changed, 102 insertions, 67 deletions
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 a99a8cb..4150b2e 100644
--- a/android-app/app/src/main/res/layout/activity_main.xml
+++ b/android-app/app/src/main/res/layout/activity_main.xml
@@ -1,36 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout 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:orientation="vertical"
tools:context=".MainActivity">
- <!-- Main Content Area -->
- <androidx.constraintlayout.widget.ConstraintLayout
+ <androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginBottom="56dp"> <!-- Space for BottomNav -->
+ android:layout_height="0dp"
+ android:layout_weight="1">
- <org.maplibre.android.maps.MapView
- android:id="@+id/mapView"
+ <!-- Main Content Area -->
+ <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent">
- <org.terst.nav.ui.map.ParticleWindView
- android:id="@+id/particle_wind_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:clickable="false"
- android:focusable="false" />
+ <org.maplibre.android.maps.MapView
+ android:id="@+id/mapView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <org.terst.nav.ui.map.ParticleWindView
+ android:id="@+id/particle_wind_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:clickable="false"
+ android:focusable="false" />
+
+ <!-- Boat-instrument HUD strip — always on top of map -->
+ <include
+ android:id="@+id/nav_hud"
+ layout="@layout/layout_nav_hud"
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent" />
+
+ <!-- Crosshair — visible when not following (panning) -->
+ <ImageView
+ android:id="@+id/map_crosshair"
+ android:layout_width="32dp"
+ android:layout_height="32dp"
+ android:src="@drawable/ic_crosshair"
+ android:visibility="gone"
+ android:clickable="false"
+ android:focusable="false"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent" />
+
+ <!-- Overlay Fragment Container (for Log, Safety, Help) -->
+ <FrameLayout
+ android:id="@+id/fragment_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/colorSurface" />
- <!-- Overlay Fragment Container (for Log, Safety, Help) -->
- <FrameLayout
- android:id="@+id/fragment_container"
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/fab_recenter"
+ android:layout_width="wrap_content"
+ android:layout_height="40dp"
+ android:text="⊙ Recenter"
+ android:textSize="13sp"
+ android:paddingStart="20dp"
+ android:paddingEnd="20dp"
+ android:visibility="gone"
+ app:cornerRadius="20dp"
+ app:elevation="20dp"
+ app:layout_constraintTop_toBottomOf="@id/nav_hud"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ android:layout_marginTop="8dp" />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <!-- Collapsible Instrument Bottom Sheet -->
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/instrument_bottom_sheet"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone"
- android:background="?attr/colorSurface" />
+ android:layout_height="wrap_content"
+ app:behavior_hideable="false"
+ app:behavior_peekHeight="120dp"
+ app:cardElevation="16dp"
+ app:shapeAppearance="@style/ShapeAppearance.Nav.BottomSheet"
+ app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
+
+ <include
+ layout="@layout/layout_instruments_sheet"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ </com.google.android.material.card.MaterialCardView>
<!-- Track stats bar — shown only while recording -->
<TextView
@@ -51,60 +118,28 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
- </androidx.constraintlayout.widget.ConstraintLayout>
-
- <!-- Collapsible Instrument Bottom Sheet -->
- <androidx.cardview.widget.CardView
- android:id="@+id/instrument_bottom_sheet"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:behavior_hideable="false"
- app:behavior_peekHeight="120dp"
- app:cardElevation="16dp"
- app:cardCornerRadius="24dp"
- app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
-
- <include
- layout="@layout/layout_instruments_sheet"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ <!-- Record Track Button -->
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/fab_record_track"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:contentDescription="Record Track"
+ app:srcCompat="@drawable/ic_track_record"
+ app:elevation="20dp"
+ app:layout_anchor="@id/instrument_bottom_sheet"
+ app:layout_anchorGravity="top|end" />
- </androidx.cardview.widget.CardView>
+ </androidx.coordinatorlayout.widget.CoordinatorLayout>
<!-- Bottom Navigation -->
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="bottom"
android:background="?attr/colorSurface"
app:menu="@menu/bottom_nav_menu" />
- <!-- Persistent MOB Button (Crucial for safety, always on top) -->
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/fab_mob"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:clickable="true"
- android:focusable="true"
- android:contentDescription="Man Overboard"
- app:srcCompat="@android:drawable/ic_dialog_alert"
- app:backgroundTint="@color/mob_button_background"
- app:layout_anchor="@id/instrument_bottom_sheet"
- app:layout_anchorGravity="top|start" />
-
- <!-- Record Track Button -->
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/fab_record_track"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:clickable="true"
- android:focusable="true"
- android:contentDescription="Record Track"
- app:srcCompat="@drawable/ic_track_record"
- app:layout_anchor="@id/instrument_bottom_sheet"
- app:layout_anchorGravity="top|end" />
-
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
+</LinearLayout>