From 3ddf436958ffde3198492895725fc0ca8ab0a1b2 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 11 Apr 2026 09:48:52 +0000 Subject: Show loading spinners next to each instrument value during conditions fetch - Add _conditionsLoading StateFlow to MainViewModel; set true when loadConditions() fires, false when the fetch completes (success or fail) - Cancel any in-flight conditions job when a new loadConditions() call arrives (e.g. rapid map pans) so only the latest fetch drives the state - Add a 10dp ProgressBar after each of the six data values in layout_instruments_sheet.xml (wind, temp, baro, current, waves, swell); visibility GONE by default, alpha 0.5; header section tinted colorOnSurfaceVariant, forecast section tinted #5B9EC2 to match its labels - Observe conditionsLoading in MainActivity and toggle all six spinners together (all values come from one API call so they load in sync) https://claude.ai/code/session_01HXPjBsogsJVRwCiekDGkJX --- .../main/res/layout/layout_instruments_sheet.xml | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'android-app/app/src/main/res/layout') 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 03cefb7..edf0928 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 @@ -64,6 +64,16 @@ android:layout_marginStart="3dp" android:layout_marginBottom="3dp" android:layout_gravity="bottom" /> + + @@ -124,6 +144,16 @@ style="@style/InstrumentPrimaryValue" tools:text="1013" /> + @@ -176,6 +206,16 @@ style="@style/ForecastValue" tools:text="0.8" /> + + +