From bf57713ef0e378ebedd518f4fb243328de08179d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Apr 2026 16:27:42 +0000 Subject: Add unit settings, wind particles toggle, and recenter-to-top MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New UnitPrefs: persisted C/F, ft/m, hPa/inHg, kt/mph/kph — defaults to °F - InstrumentHandler now accepts raw values (knots, metres, hPa, °C) and formats via UnitPrefs on every update - LayerPickerSheet expanded with wind particles toggle and unit chip selectors; wrapped in ScrollView to handle the additional height - MapLayerManager tracks particlesEnabled (persisted); setParticlesEnabled() added - MainActivity: caches last raw values so refreshUnits() can reformat everything instantly when the user changes a unit without waiting for new sensor data - Recenter button moved to top (below HUD strip) so it's never obscured by the bottom sheet or bottom nav - Unit label TextViews given IDs in HUD and instrument sheet for live updates https://claude.ai/code/session_01HXPjBsogsJVRwCiekDGkJX --- .../app/src/main/res/layout/activity_main.xml | 4 +- .../main/res/layout/layout_instruments_sheet.xml | 12 +- .../main/res/layout/layout_layer_picker_sheet.xml | 352 ++++++++++++++++----- .../app/src/main/res/layout/layout_nav_hud.xml | 3 + 4 files changed, 290 insertions(+), 81 deletions(-) (limited to 'android-app/app/src/main/res/layout') 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 5147506..5943949 100644 --- a/android-app/app/src/main/res/layout/activity_main.xml +++ b/android-app/app/src/main/res/layout/activity_main.xml @@ -90,10 +90,10 @@ android:visibility="gone" app:cornerRadius="20dp" app:elevation="20dp" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintTop_toBottomOf="@id/nav_hud" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - android:layout_marginBottom="24dp" /> + android:layout_marginTop="8dp" /> diff --git a/android-app/app/src/main/res/layout/layout_instruments_sheet.xml b/android-app/app/src/main/res/layout/layout_instruments_sheet.xml index faec826..03cefb7 100644 --- a/android-app/app/src/main/res/layout/layout_instruments_sheet.xml +++ b/android-app/app/src/main/res/layout/layout_instruments_sheet.xml @@ -56,7 +56,7 @@ android:id="@+id/value_tws" style="@style/InstrumentPrimaryValue" tools:text="15.5" /> - + - + @@ -123,7 +123,7 @@ android:id="@+id/value_baro" style="@style/InstrumentPrimaryValue" tools:text="1013" /> - + @@ -175,7 +175,7 @@ android:id="@+id/value_curr_spd" style="@style/ForecastValue" tools:text="0.8" /> - + - + - + - - - - - - - - - + + + + + + + android:layout_marginBottom="12dp" + android:text="MAP LAYERS" + android:textSize="11sp" + android:textAllCaps="true" + android:letterSpacing="0.12" + android:fontFamily="sans-serif-light" + android:textColor="@color/instrument_text_secondary" /> - + + android:layout_marginBottom="20dp" + app:singleSelection="true" + app:selectionRequired="true"> - + + + + + + + + + + + + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="12dp"> - + + + + - - + - - + + + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="8dp"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + app:singleSelection="true" + app:selectionRequired="true"> + + + - + + + + + + + + + - - + diff --git a/android-app/app/src/main/res/layout/layout_nav_hud.xml b/android-app/app/src/main/res/layout/layout_nav_hud.xml index 4623bb1..90119fa 100644 --- a/android-app/app/src/main/res/layout/layout_nav_hud.xml +++ b/android-app/app/src/main/res/layout/layout_nav_hud.xml @@ -39,6 +39,7 @@ android:fontFamily="sans-serif-medium" tools:text="7.1" />