diff options
Diffstat (limited to 'android-app/app/src/main/res')
| -rw-r--r-- | android-app/app/src/main/res/layout/activity_main.xml | 205 | ||||
| -rw-r--r-- | android-app/app/src/main/res/values/colors.xml | 2 | ||||
| -rw-r--r-- | android-app/app/src/main/res/values/strings.xml | 16 |
3 files changed, 222 insertions, 1 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 2801f23..3df0645 100644 --- a/android-app/app/src/main/res/layout/activity_main.xml +++ b/android-app/app/src/main/res/layout/activity_main.xml @@ -43,7 +43,7 @@ <androidx.constraintlayout.widget.Guideline android:id="@+id/guideline_horizontal_50" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android="layout_height="wrap_content" android:orientation="horizontal" app:layout_constraintGuide_percent="0.5" /> @@ -241,4 +241,207 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent" /> + <!-- Anchor FAB --> + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab_anchor" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:clickable="true" + android:focusable="true" + android:contentDescription="@string/fab_anchor_content_description" + app:srcCompat="@android:drawable/ic_menu_myplaces" + app:backgroundTint="@color/anchor_button_background" + app:layout_constraintBottom_toTopOf="@+id/fab_mob" + app:layout_constraintStart_toStartOf="parent" /> + + <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="@string/fab_mob_content_description" + app:srcCompat="@android:drawable/ic_dialog_alert" + app:backgroundTint="@color/mob_button_background" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintBottom_toBottomOf="parent" /> + + <!-- Anchor Configuration Container --> + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/anchor_config_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="#DD212121" + android:padding="16dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent"> + + <TextView + android:id="@+id/anchor_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/anchor_config_title" + android:textColor="@android:color/white" + android:textSize="20sp" + android:textStyle="bold" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/anchor_status_text" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:textColor="@android:color/white" + android:textSize="16sp" + tools:text="Anchor Inactive" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/anchor_title" /> + + <LinearLayout + android:id="@+id/radius_control_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_marginTop="16dp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/anchor_status_text"> + + <Button + android:id="@+id/button_decrease_radius" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="-" + android:textSize="20sp" + android:minWidth="48dp" + android:layout_marginEnd="8dp" /> + + <TextView + android:id="@+id/anchor_radius_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@android:color/white" + android:textSize="18sp" + android:textStyle="bold" + tools:text="Radius: 50.0m" + android:gravity="center_vertical" /> + + <Button + android:id="@+id/button_increase_radius" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="+" + android:textSize="20sp" + android:minWidth="48dp" + android:layout_marginStart="8dp" /> + + </LinearLayout> + + <Button + android:id="@+id/button_set_anchor" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:text="@string/button_set_anchor" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/radius_control_layout" /> + + <Button + android:id="@+id/button_stop_anchor" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:text="@string/button_stop_anchor" + android:backgroundTint="@android:color/holo_red_dark" + app:layout_constraintStart_toEndOf="@+id/button_set_anchor" + app:layout_constraintTop_toBottomOf="@+id/radius_control_layout" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <!-- MOB Navigation Display Container --> + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/mob_navigation_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/instrument_background" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <TextView + android:id="@+id/mob_label_distance" + style="@style/InstrumentLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/mob_label_distance" + app:layout_constraintBottom_toTopOf="@+id/mob_value_distance" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintVertical_chainStyle="packed" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/mob_value_distance" + style="@style/InstrumentPrimaryValue" + android:layout_width="wrap_content" + android://layout_height="wrap_content" + tools:text="125 m" + android:textSize="80sp" + app:layout_constraintBottom_toTopOf="@+id/mob_label_elapsed_time" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/mob_label_distance" /> + + <TextView + android:id="@+id/mob_label_elapsed_time" + style="@style/InstrumentLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="32dp" + android:text="@string/mob_label_elapsed_time" + app:layout_constraintBottom_toTopOf="@+id/mob_value_elapsed_time" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/mob_value_distance" /> + + <TextView + android:id="@+id/mob_value_elapsed_time" + style="@style/InstrumentPrimaryValue" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + tools:text="00:01:23" + android:textSize="60sp" + app:layout_constraintBottom_toTopOf="@+id/mob_recovered_button" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/mob_label_elapsed_time" /> + + <Button + android:id="@+id/mob_recovered_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="64dp" + android:text="@string/mob_button_recovered" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:textSize="24sp" + android:backgroundTint="@color/mob_button_background" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/mob_value_elapsed_time" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/android-app/app/src/main/res/values/colors.xml b/android-app/app/src/main/res/values/colors.xml index a66628b..3dce53c 100644 --- a/android-app/app/src/main/res/values/colors.xml +++ b/android-app/app/src/main/res/values/colors.xml @@ -12,4 +12,6 @@ <color name="instrument_text_alarm">#FFFF0000</color> <!-- Red for alarm --> <color name="instrument_text_stale">#FFFFFF00</color> <!-- Yellow for stale data --> <color name="instrument_background">#E61E1E1E</color> <!-- Slightly transparent dark grey --> + <color name="mob_button_background">#FFD70000</color> <!-- High-contrast red for MOB button --> + <color name="anchor_button_background">#3F51B5</color> </resources>
\ No newline at end of file diff --git a/android-app/app/src/main/res/values/strings.xml b/android-app/app/src/main/res/values/strings.xml index d7793de..44f67ea 100644 --- a/android-app/app/src/main/res/values/strings.xml +++ b/android-app/app/src/main/res/values/strings.xml @@ -25,4 +25,20 @@ <string name="placeholder_vmg_value">--.-</string> <string name="placeholder_depth_value">--.-</string> <string name="placeholder_polar_value">---</string> + + <string name="fab_mob_content_description">Activate Man Overboard (MOB) alarm</string> + <string name="fab_anchor_content_description">Toggle Anchor Watch Configuration</string> + + <!-- MOB Navigation View Strings --> + <string name="mob_label_distance">DISTANCE TO MOB</string> + <string name="mob_label_elapsed_time">ELAPSED TIME</string> + <string name="mob_button_recovered">RECOVERED</string> + + <!-- Anchor Watch Strings --> + <string name="anchor_config_title">Anchor Watch</string> + <string name="button_set_anchor">SET ANCHOR</string> + <string name="button_stop_anchor">STOP WATCH</string> + <string name="anchor_inactive">Anchor Watch Inactive</string> + <string name="anchor_active_format">Anchor Set at %.4f, %.4f\nRadius: %.1fm\nDistance: %.1fm (%.1fm from limit)</string> + <string name="anchor_active_dragging_format">!!! ANCHOR DRAG !!!\nAnchor Set at %.4f, %.4f\nRadius: %.1fm\nDistance: %.1fm (%.1fm OVER limit)</string> </resources>
\ No newline at end of file |
