summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/res/layout/activity_main.xml
blob: b8df5c98de44723d82733e1dcff7e480c6e2e952 (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
<?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" />

            <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>