summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/res/layout/activity_main.xml
blob: 6832daa7b2da0748c0c2e9a206299c180f8c0896 (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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?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" />

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

            <!-- Layers FAB — map layer picker -->
            <com.google.android.material.floatingactionbutton.FloatingActionButton
                android:id="@+id/fab_layers"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="12dp"
                android:contentDescription="Layers"
                app:srcCompat="@drawable/ic_layers"
                app:fabSize="mini"
                app:elevation="8dp"
                app:layout_constraintTop_toBottomOf="@id/nav_hud"
                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" />

            <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="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
            android:id="@+id/tv_track_stats"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="top|center_horizontal"
            android:layout_marginTop="12dp"
            android:paddingHorizontal="14dp"
            android:paddingVertical="6dp"
            android:background="#CC000000"
            android:textColor="#FFFFFFFF"
            android:textSize="13sp"
            android:fontFamily="monospace"
            android:text=""
            android:visibility="gone"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent" />

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