Align map sensor selector with legacy dropdown UI.

Restore the old map sensor control styling and interaction in Compose, and add previews for collapsed/expanded, search, and device panel states to speed up UI iteration.

Made-with: Cursor
This commit is contained in:
2026-02-28 22:56:33 +01:00
parent 18a652a789
commit 10613a36f8
6 changed files with 361 additions and 18 deletions

View File

@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillAlpha="0"
android:fillColor="#FF000000"
android:pathData="M0,0h24v24h-24z" />
<path
android:fillAlpha="0.54"
android:fillColor="#FF000000"
android:pathData="M8.54,11.38l2.72,2.72c0.41,0.41 1.07,0.41 1.48,0l2.72,-2.72c0.66,-0.66 0.19,-1.79 -0.74,-1.79l-5.44,0C8.34,9.59 7.88,10.72 8.54,11.38z"
android:strokeAlpha="0.54" />
</vector>

View File

@@ -0,0 +1,42 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M15.62,11.36m-2.57,0a2.57,2.57 0,1 1,5.14 0a2.57,2.57 0,1 1,-5.14 0" />
<path
android:fillColor="#FF000000"
android:pathData="M10.16,17.59m-2.3,0a2.3,2.3 0,1 1,4.6 0a2.3,2.3 0,1 1,-4.6 0" />
<path
android:fillColor="#FF000000"
android:pathData="M6.09,7.24m-2.31,0a2.31,2.31 0,1 1,4.62 0a2.31,2.31 0,1 1,-4.62 0" />
<path
android:fillColor="#FF000000"
android:pathData="M21.35,10.63m-1.65,0a1.65,1.65 0,1 1,3.3 0a1.65,1.65 0,1 1,-3.3 0" />
<path
android:fillColor="#FF000000"
android:pathData="M5.76,13.19m-1.83,0a1.83,1.83 0,1 1,3.66 0a1.83,1.83 0,1 1,-3.66 0" />
<path
android:fillColor="#FF000000"
android:pathData="M11.78,6.51m-1.83,0a1.83,1.83 0,1 1,3.66 0a1.83,1.83 0,1 1,-3.66 0" />
<path
android:fillColor="#FF000000"
android:pathData="M4.08,18.66m-1.47,0a1.47,1.47 0,1 1,2.94 0a1.47,1.47 0,1 1,-2.94 0" />
<path
android:fillColor="#FF000000"
android:pathData="M22.08,16.1m-0.72,0a0.72,0.72 0,1 1,1.44 0a0.72,0.72 0,1 1,-1.44 0" />
<path
android:fillColor="#FF000000"
android:pathData="M16.42,4.67m-0.8,0a0.8,0.8 0,1 1,1.6 0a0.8,0.8 0,1 1,-1.6 0" />
<path
android:fillColor="#FF000000"
android:pathData="M16.42,16.59m-1.09,0a1.09,1.09 0,1 1,2.18 0a1.09,1.09 0,1 1,-2.18 0" />
<path
android:fillColor="#FF000000"
android:pathData="M1.72,10.63m-0.72,0a0.72,0.72 0,1 1,1.44 0a0.72,0.72 0,1 1,-1.44 0" />
<path
android:fillColor="#FF000000"
android:pathData="M10.81,12.08m-0.9,0a0.9,0.9 0,1 1,1.8 0a0.9,0.9 0,1 1,-1.8 0" />
</vector>

View File

@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M13.79,11.19c0,0.66 -0.36,1.23 -0.9,1.53c-0.25,0.17 -0.56,0.25 -0.88,0.25s-0.63,-0.08 -0.89,-0.25c-0.53,-0.3 -0.9,-0.87 -0.9,-1.53s0.37,-1.25 0.9,-1.54c0.26,-0.17 0.57,-0.25 0.89,-0.25s0.63,0.08 0.88,0.25C13.43,9.95 13.79,10.53 13.79,11.19z" />
<path
android:fillColor="#FF000000"
android:pathData="M10.19,8.06c-1.07,0.63 -1.8,1.8 -1.8,3.13H2.7c-0.4,0 -0.73,-0.34 -0.7,-0.74C2.23,7.3 3.9,4.57 6.36,2.9c0.33,-0.23 0.79,-0.1 0.99,0.24L10.19,8.06z" />
<path
android:fillColor="#FF000000"
android:pathData="M22,10.45c0.03,0.4 -0.3,0.74 -0.7,0.74h-5.69c0,-1.33 -0.73,-2.52 -1.8,-3.13l2.84,-4.92c0.2,-0.34 0.66,-0.47 0.99,-0.24C20.1,4.57 21.77,7.3 22,10.45z" />
<path
android:fillColor="#FF000000"
android:pathData="M16.37,20.21c-1.32,0.64 -2.8,1 -4.36,1c-1.57,0 -3.06,-0.36 -4.37,-1c-0.37,-0.17 -0.49,-0.63 -0.29,-0.99l2.84,-4.92c0.53,0.31 1.16,0.49 1.82,0.49s1.27,-0.17 1.8,-0.49l2.84,4.92C16.85,19.58 16.74,20.04 16.37,20.21z" />
</vector>

View File

@@ -1,7 +1,10 @@
<resources>
<string name="app_name">AirMQ</string>
<string name="map_sensor_dust">Dust</string>
<string name="map_sensor_air_quality">Air quality</string>
<string name="map_sensor_radioactivity">Radioactivity</string>
<string name="map_sensor_help_link">What does this mean?</string>
<string name="map_sensor_help_title">What do AirMQ sensors measure?</string>
<string name="map_search_action_content_desc">Search</string>
<string name="map_my_location_content_desc">My location</string>
<string name="map_back">Back</string>