blob: 0734476cbe41500ebfd4e482db12c9f1fd434424 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
<?xml version="1.0" encoding="utf-8"?>
<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">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<!-- Main Content Area -->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.maplibre.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="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" />
<!-- Quit button — stops all services and exits -->
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_quit"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
android:layout_width="40dp"
android:layout_height="40dp"
android:alpha="0.7"
app:icon="@drawable/ic_close"
app:iconSize="18dp"
app:iconGravity="textStart"
app:iconPadding="0dp"
app:cornerRadius="20dp"
app:elevation="4dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" />
<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" />
</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" />
</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:background="?attr/colorSurface"
app:menu="@menu/bottom_nav_menu" />
</LinearLayout>
|