diff options
Diffstat (limited to 'android-app/app/src/main/res/layout')
3 files changed, 340 insertions, 2 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 5f1c8c2..4150b2e 100644 --- a/android-app/app/src/main/res/layout/activity_main.xml +++ b/android-app/app/src/main/res/layout/activity_main.xml @@ -99,6 +99,25 @@ </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" diff --git a/android-app/app/src/main/res/layout/fragment_safety.xml b/android-app/app/src/main/res/layout/fragment_safety.xml index 60ea1aa..1072abe 100644 --- a/android-app/app/src/main/res/layout/fragment_safety.xml +++ b/android-app/app/src/main/res/layout/fragment_safety.xml @@ -63,6 +63,41 @@ </com.google.android.material.card.MaterialCardView> + <!-- CPA / Collision Alert Section --> + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_cpa" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + app:cardCornerRadius="16dp" + app:layout_constraintTop_toBottomOf="@id/card_mob"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="COLLISION AVOIDANCE" + android:textStyle="bold" /> + + <TextView + android:id="@+id/tv_cpa_status" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="No traffic alerts" + android:textColor="?attr/colorOnSurfaceVariant" + android:fontFamily="monospace" + android:textSize="13sp" /> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> + <!-- Anchor Section --> <com.google.android.material.card.MaterialCardView android:id="@+id/card_anchor" @@ -70,7 +105,7 @@ android:layout_height="wrap_content" android:layout_marginTop="16dp" app:cardCornerRadius="16dp" - app:layout_constraintTop_toBottomOf="@id/card_mob"> + app:layout_constraintTop_toBottomOf="@id/card_cpa"> <LinearLayout android:layout_width="match_parent" @@ -104,6 +139,113 @@ </com.google.android.material.card.MaterialCardView> + <!-- Hardware Data Sources --> + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_data_sources" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + app:cardCornerRadius="16dp" + app:layout_constraintTop_toBottomOf="@id/card_anchor"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="HARDWARE DATA SOURCES" + android:textStyle="bold" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="4dp" + android:layout_marginBottom="12dp" + android:text="Enable only the hardware you have connected" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <!-- AIS Receiver row --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="8dp"> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="AIS Receiver" + android:textSize="15sp" + android:textColor="?attr/colorOnSurface" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Vessel tracking, collision alerts" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + </LinearLayout> + + <com.google.android.material.materialswitch.MaterialSwitch + android:id="@+id/switch_ais" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + </LinearLayout> + + <!-- NMEA Instruments row --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical"> + + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="NMEA Instruments" + android:textSize="15sp" + android:textColor="?attr/colorOnSurface" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Wind, depth, boat speed" + android:textSize="12sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + </LinearLayout> + + <com.google.android.material.materialswitch.MaterialSwitch + android:id="@+id/switch_nmea" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + </LinearLayout> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> + <com.google.android.material.button.MaterialButton android:id="@+id/button_plan_trip" style="@style/Widget.Material3.Button.TonalButton" @@ -111,7 +253,7 @@ android:layout_height="60dp" android:layout_marginTop="24dp" android:text="PLAN TRIP (PRE-TRIP REPORT)" - app:layout_constraintTop_toBottomOf="@id/card_anchor" /> + app:layout_constraintTop_toBottomOf="@id/card_data_sources" /> <com.google.android.material.button.MaterialButton android:id="@+id/button_quit" diff --git a/android-app/app/src/main/res/layout/fragment_vessel_registry.xml b/android-app/app/src/main/res/layout/fragment_vessel_registry.xml new file mode 100644 index 0000000..6b55fa6 --- /dev/null +++ b/android-app/app/src/main/res/layout/fragment_vessel_registry.xml @@ -0,0 +1,177 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.core.widget.NestedScrollView + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/colorSurface"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="24dp"> + + <!-- Title row --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="Vessel Registry" + android:textSize="24sp" + android:textStyle="bold" + android:textColor="?attr/colorOnSurface" /> + + </LinearLayout> + + <!-- OWN VESSEL card --> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="20dp" + android:layout_marginBottom="8dp" + android:text="OWN VESSEL" + android:textSize="12sp" + android:textStyle="bold" + android:letterSpacing="0.1" + android:textColor="?attr/colorPrimary" /> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/card_own_vessel" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:cardCornerRadius="12dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:id="@+id/tv_own_vessel_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="No vessel configured" + android:textSize="18sp" + android:textStyle="bold" + android:textColor="?attr/colorOnSurface" /> + + <TextView + android:id="@+id/tv_own_vessel_details" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="4dp" + android:text="" + android:textSize="14sp" + android:textColor="?attr/colorOnSurfaceVariant" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/button_edit_own_vessel" + style="@style/Widget.Material3.Button.TonalButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="12dp" + android:text="EDIT VESSEL" /> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> + + <!-- CREW section --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginTop="24dp" + android:layout_marginBottom="8dp"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="CREW" + android:textSize="12sp" + android:textStyle="bold" + android:letterSpacing="0.1" + android:textColor="?attr/colorPrimary" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/button_add_crew" + style="@style/Widget.Material3.Button.TextButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="+ ADD" /> + + </LinearLayout> + + <LinearLayout + android:id="@+id/crew_list_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" /> + + <TextView + android:id="@+id/tv_crew_empty" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="No crew members added yet." + android:textSize="14sp" + android:textColor="?attr/colorOnSurfaceVariant" + android:visibility="visible" /> + + <!-- FLEET section --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginTop="24dp" + android:layout_marginBottom="8dp"> + + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="KNOWN VESSELS" + android:textSize="12sp" + android:textStyle="bold" + android:letterSpacing="0.1" + android:textColor="?attr/colorPrimary" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/button_add_vessel" + style="@style/Widget.Material3.Button.TextButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="+ ADD" /> + + </LinearLayout> + + <LinearLayout + android:id="@+id/vessel_list_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" /> + + <TextView + android:id="@+id/tv_vessel_empty" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="No additional vessels recorded." + android:textSize="14sp" + android:textColor="?attr/colorOnSurfaceVariant" + android:visibility="visible" /> + + </LinearLayout> + +</androidx.core.widget.NestedScrollView> |
