diff options
Diffstat (limited to 'android-app')
| -rw-r--r-- | android-app/app/src/main/res/layout/activity_main.xml | 158 |
1 files changed, 82 insertions, 76 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 a3d347f..b8df5c9 100644 --- a/android-app/app/src/main/res/layout/activity_main.xml +++ b/android-app/app/src/main/res/layout/activity_main.xml @@ -1,102 +1,108 @@ <?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"> - <!-- 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:background="?attr/colorSurface" /> + <org.maplibre.android.maps.MapView + android:id="@+id/mapView" + android:layout_width="match_parent" + android:layout_height="match_parent" /> - <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_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - android:layout_marginBottom="24dp" /> + <!-- 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:background="?attr/colorSurface" /> - </androidx.constraintlayout.widget.ConstraintLayout> + <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_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + android:layout_marginBottom="24dp" /> - <!-- 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"> + </androidx.constraintlayout.widget.ConstraintLayout> - <include - layout="@layout/layout_instruments_sheet" + <!-- Collapsible Instrument Bottom Sheet --> + <androidx.cardview.widget.CardView + android:id="@+id/instrument_bottom_sheet" android:layout_width="match_parent" - android:layout_height="wrap_content" /> + 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"> - </androidx.cardview.widget.CardView> + <include + layout="@layout/layout_instruments_sheet" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + </androidx.cardview.widget.CardView> + + <!-- 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:elevation="20dp" + 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:elevation="20dp" + app:layout_anchor="@id/instrument_bottom_sheet" + app:layout_anchorGravity="top|end" /> + + </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:elevation="20dp" - 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:elevation="20dp" - app:layout_anchor="@id/instrument_bottom_sheet" - app:layout_anchorGravity="top|end" /> - -</androidx.coordinatorlayout.widget.CoordinatorLayout> +</LinearLayout> |
