maps P9: parking memory (save/recall parking spot)
- Commit
c47dc661ad1170f395b56753a26bb112ba4e08f7- Author
- vayun-mathur <[email protected]>
- When
- 2026-08-17 00:16 UTC (3 months ago)
- Parents
cba0411
Diff
maps/src/main/java/com/vayunmathur/maps/MainActivity.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/MainActivity.kt b/maps/src/main/java/com/vayunmathur/maps/MainActivity.ktindex 4608c27d72..0632bbadc5 100644--- a/maps/src/main/java/com/vayunmathur/maps/MainActivity.kt+++ b/maps/src/main/java/com/vayunmathur/maps/MainActivity.kt@@ -122,11 +122,12 @@ fun Navigation( savedPlacesViewModel: SavedPlacesViewModel = viewModel(), poiViewModel: GooglePoiMapViewModel = viewModel(), settingsViewModel: MapSettingsViewModel = viewModel(),+ parkingViewModel: com.vayunmathur.maps.util.ParkingViewModel = viewModel(), ) { val backStack = rememberNavBackStack<Route>(Route.MapPage) MainNavigation(backStack) { entry<Route.MapPage> {- MapPage(backStack, viewModel, zonesViewModel, savedPlacesViewModel, poiViewModel, searchViewModel, settingsViewModel)+ MapPage(backStack, viewModel, zonesViewModel, savedPlacesViewModel, poiViewModel, searchViewModel, settingsViewModel, parkingViewModel) } entry<Route.DownloadedMapsPage> { DownloadedMapsPage(backStack, zonesViewModel)
maps/src/main/java/com/vayunmathur/maps/data/ParkingStore.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/data/ParkingStore.kt b/maps/src/main/java/com/vayunmathur/maps/data/ParkingStore.ktnew file mode 100644index 0000000000..ca204d1824--- /dev/null+++ b/maps/src/main/java/com/vayunmathur/maps/data/ParkingStore.kt@@ -0,0 +1,69 @@+package com.vayunmathur.maps.data++import com.vayunmathur.library.util.DataStoreUtils+import kotlinx.coroutines.flow.Flow+import kotlinx.coroutines.flow.map+import kotlinx.serialization.Serializable+import kotlinx.serialization.json.Json+import org.maplibre.spatialk.geojson.Position++/**+ * A remembered parking spot (P9, Vela's `ParkingStore`): where the user left+ * their car, when, and an optional note. Only what we need to drop a pin,+ * recall the spot, and route back to it.+ */+@Serializable+data class ParkingSpot(+ val lat: Double,+ val lon: Double,+ val timestamp: Long,+ val note: String? = null,+) {+ /** Turn the spot into a routable destination so "directions" reuses the+ * existing routing/nav path. */+ fun toFeature(name: String): SpecificFeature.GenericPlace =+ SpecificFeature.GenericPlace(+ name = name,+ phone = null,+ website = null,+ openingHours = null,+ position = Position(lon, lat),+ )+}++/**+ * Persistence for parking memory (P9), mirroring [SavedPlaceStore]'s thin+ * DataStore pattern: a single **active** spot plus a small **history** of+ * previously-cleared spots. Each field is one JSON string in DataStore;+ * [com.vayunmathur.maps.util.ParkingViewModel] owns the coroutine scope and+ * turns these flows into `StateFlow`s.+ */+class ParkingStore(private val ds: DataStoreUtils) {++ fun activeFlow(): Flow<ParkingSpot?> = ds.stringFlow(KEY_ACTIVE).map { decode(it) }+ fun activeInitial(): ParkingSpot? = decode(ds.getString(KEY_ACTIVE))++ suspend fun setActive(spot: ParkingSpot?) = ds.setString(KEY_ACTIVE, encode(spot))++ fun historyFlow(): Flow<List<ParkingSpot>> = ds.stringFlow(KEY_HISTORY).map { decodeList(it) }+ fun historyInitial(): List<ParkingSpot> = decodeList(ds.getString(KEY_HISTORY))++ suspend fun setHistory(list: List<ParkingSpot>) = ds.setString(KEY_HISTORY, Json.encodeToString(list))++ private fun encode(spot: ParkingSpot?): String =+ spot?.let { Json.encodeToString(it) } ?: ""++ private fun decode(raw: String?): ParkingSpot? =+ raw?.takeIf { it.isNotBlank() }+ ?.let { runCatching { Json.decodeFromString<ParkingSpot>(it) }.getOrNull() }++ private fun decodeList(raw: String?): List<ParkingSpot> =+ raw?.takeIf { it.isNotBlank() }+ ?.let { runCatching { Json.decodeFromString<List<ParkingSpot>>(it) }.getOrNull() }+ ?: emptyList()++ companion object {+ private const val KEY_ACTIVE = "parking_active_spot"+ private const val KEY_HISTORY = "parking_history"+ }+}
maps/src/main/java/com/vayunmathur/maps/ui/MapPage.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/MapPage.kt b/maps/src/main/java/com/vayunmathur/maps/ui/MapPage.ktindex 9843ee4c7a..b17b8ebab5 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/MapPage.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/MapPage.kt@@ -112,7 +112,7 @@ import com.vayunmathur.maps.R as MapsR @OptIn(ExperimentalMaterial3Api::class) @Composable-fun MapPage(backStack: NavBackStack<Route>, viewModel: SelectedFeatureViewModel, zonesViewModel: MapsZonesViewModel, savedPlacesViewModel: SavedPlacesViewModel, poiViewModel: GooglePoiMapViewModel, searchViewModel: MapsSearchViewModel, settingsViewModel: MapSettingsViewModel) {+fun MapPage(backStack: NavBackStack<Route>, viewModel: SelectedFeatureViewModel, zonesViewModel: MapsZonesViewModel, savedPlacesViewModel: SavedPlacesViewModel, poiViewModel: GooglePoiMapViewModel, searchViewModel: MapsSearchViewModel, settingsViewModel: MapSettingsViewModel, parkingViewModel: com.vayunmathur.maps.util.ParkingViewModel) { val selectedFeature by viewModel.selectedFeature.collectAsState() val context = LocalContext.current val coroutineScope = rememberCoroutineScope()@@ -126,6 +126,10 @@ fun MapPage(backStack: NavBackStack<Route>, viewModel: SelectedFeatureViewModel, (listOfNotNull(savedHome, savedWork) + savedList).distinct() } + // Parking memory (P9): the single active parking spot (pin + recall).+ val parkingSpot by parkingViewModel.active.collectAsState()+ var showParkingSheet by remember { mutableStateOf(false) }+ // Map-layer visibility toggles (P6 layers sheet, persisted via DataStore). val trafficEnabled by settingsViewModel.trafficLayer.collectAsState() val satelliteEnabled by settingsViewModel.satelliteLayer.collectAsState()@@ -396,6 +400,18 @@ fun MapPage(backStack: NavBackStack<Route>, viewModel: SelectedFeatureViewModel, onMapClick = { latLng, offset -> coroutineScope.launch { val projection = camera.projection+ // Parking pin (P9): tapping the saved car spot+ // opens the parking sheet instead of selecting a+ // place.+ val parkingHit = projection?.queryRenderedFeatures(+ offset,+ setOf(PARKING_PIN_LAYER_ID)+ )?.isNotEmpty() == true+ if (parkingHit) {+ showParkingSheet = true+ return@launch+ }+ // Hit-test the search-result pins first, then the // ambient Google POI overlay — a pin tap re-selects // the place as a GenericPlace so@@ -467,7 +483,7 @@ fun MapPage(backStack: NavBackStack<Route>, viewModel: SelectedFeatureViewModel, ClickResult.Pass } ) {- MyMapLayers(selectedFeature, route?.get(selectedRouteType), json, userPosition, userBearing, navProgress, googlePins, searchResults, savedPins, trafficEnabled, satelliteEnabled, safetyEnabled)+ MyMapLayers(selectedFeature, route?.get(selectedRouteType), json, userPosition, userBearing, navProgress, googlePins, searchResults, savedPins, parkingSpot, trafficEnabled, satelliteEnabled, safetyEnabled) } } @@ -639,6 +655,32 @@ fun MapPage(backStack: NavBackStack<Route>, viewModel: SelectedFeatureViewModel, }, ) LayersButton(onClick = { showLayersSheet = true })+ // Parking memory (P9): with no saved spot, tap saves the+ // current location; with a saved spot, tap recenters on+ // it and opens the parking sheet ("find my car").+ FloatingActionButton(+ onClick = {+ val spot = parkingSpot+ if (spot == null) {+ val p = userPosition+ if (p.latitude != 0.0 || p.longitude != 0.0) {+ parkingViewModel.saveParking(p.latitude, p.longitude)+ }+ } else {+ coroutineScope.launch {+ camera.animateTo(+ camera.position.copy(+ target = Position(spot.lon, spot.lat),+ zoom = maxOf(camera.position.zoom, 15.0),+ )+ )+ }+ showParkingSheet = true+ }+ }+ ) {+ Text(stringResource(MapsR.string.parking_pin_glyph))+ } FloatingActionButton( onClick = { coroutineScope.launch {@@ -691,6 +733,33 @@ fun MapPage(backStack: NavBackStack<Route>, viewModel: SelectedFeatureViewModel, onSafetyChange = { settingsViewModel.setSafetyLayer(it) }, ) }++ // Parking sheet (P9): saved time + note, clear, and directions+ // back to the car through the existing routing path.+ if (showParkingSheet) {+ parkingSpot?.let { spot ->+ ParkingSheet(+ spot = spot,+ onDismiss = { showParkingSheet = false },+ onClear = {+ parkingViewModel.clear()+ showParkingSheet = false+ },+ onDirections = {+ val feature = spot.toFeature(+ context.getString(MapsR.string.parking_title)+ )+ if (selectedFeature is SpecificFeature.Route) {+ viewModel.setInactiveNavigation(selectedFeature as SpecificFeature.Route)+ }+ viewModel.set(SpecificFeature.Route(listOf(null, feature)))+ showParkingSheet = false+ coroutineScope.launch { scaffoldState.bottomSheetState.expand() }+ },+ onNoteChange = { parkingViewModel.updateNote(it) },+ )+ }+ } } } }
maps/src/main/java/com/vayunmathur/maps/ui/MyMapLayers.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/MyMapLayers.kt b/maps/src/main/java/com/vayunmathur/maps/ui/MyMapLayers.ktindex 0bab43b089..ecdeccadc5 100644--- a/maps/src/main/java/com/vayunmathur/maps/ui/MyMapLayers.kt+++ b/maps/src/main/java/com/vayunmathur/maps/ui/MyMapLayers.kt@@ -56,6 +56,7 @@ fun MyMapLayers( googlePins: List<GooglePoiPin> = emptyList(), searchResults: List<SearchResult> = emptyList(), savedPlaces: List<com.vayunmathur.maps.data.SavedPlace> = emptyList(),+ parkingSpot: com.vayunmathur.maps.data.ParkingSpot? = null, trafficEnabled: Boolean = true, satelliteEnabled: Boolean = false, safetyEnabled: Boolean = false,@@ -162,6 +163,9 @@ fun MyMapLayers( // place → PlaceSheet (Vela's SavedPin). SavedPlacesLayer(savedPlaces) + // Parking pin (P9). Tap → parking sheet (handled in MapPage.onMapClick).+ ParkingLayer(parkingSpot)+ // Posted-speed-limit probe overlay (Decision D4). Invisible; queried // under the puck during navigation. No-op until the tileset is hosted. MaxspeedLayer()
maps/src/main/java/com/vayunmathur/maps/ui/ParkingLayer.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/ParkingLayer.kt b/maps/src/main/java/com/vayunmathur/maps/ui/ParkingLayer.ktnew file mode 100644index 0000000000..b44385ae5d--- /dev/null+++ b/maps/src/main/java/com/vayunmathur/maps/ui/ParkingLayer.kt@@ -0,0 +1,123 @@+package com.vayunmathur.maps.ui++import androidx.compose.runtime.Composable+import androidx.compose.runtime.LaunchedEffect+import androidx.compose.runtime.getValue+import androidx.compose.runtime.mutableStateOf+import androidx.compose.runtime.remember+import androidx.compose.runtime.setValue+import androidx.compose.ui.graphics.Color+import androidx.compose.ui.graphics.ImageBitmap+import androidx.compose.ui.graphics.asImageBitmap+import androidx.compose.ui.unit.dp+import com.vayunmathur.maps.data.Feature1+import com.vayunmathur.maps.data.ParkingSpot+import kotlinx.serialization.json.JsonObject+import kotlinx.serialization.json.JsonPrimitive+import org.maplibre.compose.expressions.dsl.const+import org.maplibre.compose.expressions.dsl.image+import org.maplibre.compose.expressions.dsl.interpolate+import org.maplibre.compose.expressions.dsl.linear+import org.maplibre.compose.expressions.dsl.zoom+import org.maplibre.compose.layers.CircleLayer+import org.maplibre.compose.layers.SymbolLayer+import org.maplibre.compose.sources.GeoJsonData+import org.maplibre.compose.sources.GeoJsonOptions+import org.maplibre.compose.sources.GeoJsonSource+import org.maplibre.compose.util.MaplibreComposable+import org.maplibre.spatialk.geojson.FeatureCollection+import org.maplibre.spatialk.geojson.Point+import org.maplibre.spatialk.geojson.Position++/** Symbol layer id — hit-tested in MapPage.onMapClick so tapping the parking pin+ * opens the parking sheet (Vela's parking pin). */+const val PARKING_PIN_LAYER_ID = "parking-pin"+private const val PARKING_DOT_LAYER_ID = "parking-dot"+private const val PARKING_SOURCE_ID = "parking-geojson"++/** Parking blue, distinct from the saved-place and search-result pins. */+private val PARKING_COLOR = Color(0xFF1967D2)++/**+ * Parking-pin overlay (P9): a [GeoJsonSource] holding the single active+ * [ParkingSpot] plus a [CircleLayer] body and a [SymbolLayer] "P" glyph on top,+ * ported to maplibre-compose declarative layers exactly like [SavedPlacesLayer]+ * / [GooglePoiLayer]. Renders nothing when no spot is saved.+ */+@Composable+@MaplibreComposable+fun ParkingLayer(spot: ParkingSpot?) {+ val marker = remember { generateParkingBitmap() }+ var source by remember { mutableStateOf<GeoJsonSource?>(null) }++ LaunchedEffect(Unit) {+ source = GeoJsonSource(+ PARKING_SOURCE_ID,+ GeoJsonData.Features(FeatureCollection(emptyList<Feature1>())),+ GeoJsonOptions(),+ )+ }++ source?.let { src ->+ LaunchedEffect(spot) {+ val features = spot?.let { listOf(it.toPinFeature()) } ?: emptyList()+ src.setData(GeoJsonData.Features(FeatureCollection(features)))+ }++ CircleLayer(+ PARKING_DOT_LAYER_ID,+ src,+ color = const(PARKING_COLOR),+ radius = interpolate(+ linear(), zoom(),+ 11 to const(6.dp),+ 14 to const(8.dp),+ 17 to const(11.dp),+ ),+ strokeColor = const(Color.White),+ strokeWidth = const(2.dp),+ )++ SymbolLayer(+ PARKING_PIN_LAYER_ID,+ src,+ iconImage = image(marker),+ iconSize = interpolate(+ linear(), zoom(),+ 11 to const(0.45f),+ 14 to const(0.6f),+ 17 to const(0.75f),+ ),+ )+ }+}++/** Rebuild the parking spot as a GeoJSON point feature; lat/lon ride along so+ * onMapClick can recognise the pin. */+private fun ParkingSpot.toPinFeature(): Feature1 = Feature1(+ Point(Position(lon, lat)),+ JsonObject(+ mapOf(+ "lat" to JsonPrimitive(lat),+ "lng" to JsonPrimitive(lon),+ )+ ),+)++/** Draw the parking marker once: a white "P" glyph shown on top of the blue base+ * circle. */+private fun generateParkingBitmap(): ImageBitmap {+ val size = 48+ val bmp = android.graphics.Bitmap.createBitmap(size, size, android.graphics.Bitmap.Config.ARGB_8888)+ val canvas = android.graphics.Canvas(bmp)+ val paint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG)+ paint.color = android.graphics.Color.WHITE+ paint.textSize = size * 0.72f+ paint.textAlign = android.graphics.Paint.Align.CENTER+ paint.typeface = android.graphics.Typeface.create(android.graphics.Typeface.DEFAULT, android.graphics.Typeface.BOLD)+ // Vertically centre the glyph using the font metrics.+ val metrics = paint.fontMetrics+ val baseline = size / 2f - (metrics.ascent + metrics.descent) / 2f+ canvas.drawText("P", size / 2f, baseline, paint)+ return bmp.asImageBitmap()+}
maps/src/main/java/com/vayunmathur/maps/ui/ParkingSheet.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/ui/ParkingSheet.kt b/maps/src/main/java/com/vayunmathur/maps/ui/ParkingSheet.ktnew file mode 100644index 0000000000..9ca10960ff--- /dev/null+++ b/maps/src/main/java/com/vayunmathur/maps/ui/ParkingSheet.kt@@ -0,0 +1,98 @@+package com.vayunmathur.maps.ui++import androidx.compose.foundation.layout.Arrangement+import androidx.compose.foundation.layout.Column+import androidx.compose.foundation.layout.Row+import androidx.compose.foundation.layout.Spacer+import androidx.compose.foundation.layout.fillMaxWidth+import androidx.compose.foundation.layout.height+import androidx.compose.foundation.layout.padding+import androidx.compose.foundation.layout.size+import androidx.compose.foundation.layout.width+import androidx.compose.runtime.Composable+import androidx.compose.runtime.getValue+import androidx.compose.runtime.mutableStateOf+import androidx.compose.runtime.remember+import androidx.compose.runtime.setValue+import androidx.compose.ui.Alignment+import androidx.compose.ui.Modifier+import androidx.compose.ui.res.stringResource+import androidx.compose.ui.unit.dp+import com.vayunmathur.library.ui.Button+import com.vayunmathur.library.ui.ExperimentalMaterial3Api+import com.vayunmathur.library.ui.IconDirections+import com.vayunmathur.library.ui.MaterialTheme+import com.vayunmathur.library.ui.ModalBottomSheet+import com.vayunmathur.library.ui.Text+import com.vayunmathur.library.ui.TextButton+import com.vayunmathur.library.ui.TextField+import com.vayunmathur.maps.R+import com.vayunmathur.maps.data.ParkingSpot++/**+ * Small parking sheet (P9): shows when the car was parked, lets the user add a+ * note, clear the spot ("found my car"), or get directions back to it through+ * the existing routing path. Uses the shared [ModalBottomSheet] (no raw+ * scaffold), mirroring [LayersSheet].+ *+ * The note is persisted once, when the sheet is dismissed or an action is+ * taken, to avoid a DataStore write per keystroke.+ */+@OptIn(ExperimentalMaterial3Api::class)+@Composable+fun ParkingSheet(+ spot: ParkingSpot,+ onDismiss: () -> Unit,+ onClear: () -> Unit,+ onDirections: () -> Unit,+ onNoteChange: (String) -> Unit,+) {+ var note by remember(spot.timestamp) { mutableStateOf(spot.note ?: "") }+ val savedAt = remember(spot.timestamp) {+ java.text.DateFormat+ .getDateTimeInstance(java.text.DateFormat.MEDIUM, java.text.DateFormat.SHORT)+ .format(java.util.Date(spot.timestamp))+ }++ ModalBottomSheet(onDismissRequest = { onNoteChange(note); onDismiss() }) {+ Column(Modifier.fillMaxWidth().padding(start = 16.dp, end = 16.dp, bottom = 24.dp)) {+ Text(+ stringResource(R.string.parking_title),+ style = MaterialTheme.typography.titleMedium,+ color = MaterialTheme.colorScheme.primary,+ )+ Spacer(Modifier.height(4.dp))+ Text(+ stringResource(R.string.parking_saved_at, savedAt),+ style = MaterialTheme.typography.bodyMedium,+ color = MaterialTheme.colorScheme.onSurfaceVariant,+ )+ Spacer(Modifier.height(12.dp))+ TextField(+ value = note,+ onValueChange = { note = it },+ placeholder = { Text(stringResource(R.string.parking_note_hint)) },+ modifier = Modifier.fillMaxWidth(),+ singleLine = true,+ )+ Spacer(Modifier.height(16.dp))+ Row(+ modifier = Modifier.fillMaxWidth(),+ horizontalArrangement = Arrangement.spacedBy(8.dp),+ verticalAlignment = Alignment.CenterVertically,+ ) {+ Button(+ onClick = { onNoteChange(note); onDirections() },+ modifier = Modifier.weight(1f),+ ) {+ IconDirections(Modifier.size(18.dp))+ Spacer(Modifier.width(8.dp))+ Text(stringResource(R.string.directions))+ }+ TextButton(onClick = onClear) {+ Text(stringResource(R.string.parking_clear))+ }+ }+ }+ }+}
maps/src/main/java/com/vayunmathur/maps/util/ParkingViewModel.kt
diff --git a/maps/src/main/java/com/vayunmathur/maps/util/ParkingViewModel.kt b/maps/src/main/java/com/vayunmathur/maps/util/ParkingViewModel.ktnew file mode 100644index 0000000000..41a19ff8af--- /dev/null+++ b/maps/src/main/java/com/vayunmathur/maps/util/ParkingViewModel.kt@@ -0,0 +1,60 @@+package com.vayunmathur.maps.util++import android.app.Application+import androidx.lifecycle.AndroidViewModel+import androidx.lifecycle.viewModelScope+import com.vayunmathur.library.util.DataStoreUtils+import com.vayunmathur.maps.data.ParkingSpot+import com.vayunmathur.maps.data.ParkingStore+import kotlinx.coroutines.flow.SharingStarted+import kotlinx.coroutines.flow.StateFlow+import kotlinx.coroutines.flow.stateIn+import kotlinx.coroutines.launch++/**+ * Parking memory (P9): exposes the single active parking spot plus a short+ * history to the UI, backed by [ParkingStore]. Follows the same shape as+ * [SavedPlacesViewModel] — persistence lives in the store; this class only adds+ * the `viewModelScope`, turns the store flows into `StateFlow`s, and edits the+ * latest snapshot before writing it back.+ */+class ParkingViewModel(application: Application) : AndroidViewModel(application) {+ private val store = ParkingStore(DataStoreUtils.getInstance(application))++ val active: StateFlow<ParkingSpot?> =+ store.activeFlow().stateIn(viewModelScope, SharingStarted.Eagerly, store.activeInitial())+ val history: StateFlow<List<ParkingSpot>> =+ store.historyFlow().stateIn(viewModelScope, SharingStarted.Eagerly, store.historyInitial())++ /** Save the current location as the active parking spot. Any previous active+ * spot is pushed onto the history. */+ fun saveParking(lat: Double, lon: Double, note: String? = null) = launch {+ archiveActive()+ store.setActive(ParkingSpot(lat, lon, System.currentTimeMillis(), note?.ifBlank { null }))+ }++ /** Update the note on the active spot (kept in place; not archived). */+ fun updateNote(note: String?) = launch {+ val current = active.value ?: return@launch+ store.setActive(current.copy(note = note?.ifBlank { null }))+ }++ /** Clear the active spot ("found my car"), archiving it to history. */+ fun clear() = launch {+ archiveActive()+ store.setActive(null)+ }++ private suspend fun archiveActive() {+ val prev = active.value ?: return+ store.setHistory((listOf(prev) + history.value).take(MAX_HISTORY))+ }++ private fun launch(block: suspend () -> Unit) {+ viewModelScope.launch { block() }+ }++ companion object {+ private const val MAX_HISTORY = 10+ }+}
maps/src/main/res/values/strings.xml
diff --git a/maps/src/main/res/values/strings.xml b/maps/src/main/res/values/strings.xmlindex 98191322a2..12b74098ba 100644--- a/maps/src/main/res/values/strings.xml+++ b/maps/src/main/res/values/strings.xml@@ -355,4 +355,15 @@ <string name="saved_action_remove">Remove</string> <!-- SavedPlacesPage: generic cancel button. Verb. --> <string name="saved_cancel">Cancel</string>++ <!-- Parking memory (P9): title of the parking sheet and FAB label. Noun. -->+ <string name="parking_title">Parking</string>+ <!-- Parking FAB glyph — the standard "P" parking symbol; not translated. -->+ <string name="parking_pin_glyph" translatable="false">P</string>+ <!-- Parking sheet: when the car was parked. %1$s=formatted date/time e.g. "Aug 17, 9:41 AM" -->+ <string name="parking_saved_at">Parked <xliff:g id="time" example="Aug 17, 9:41 AM">%1$s</xliff:g></string>+ <!-- Parking sheet: placeholder for the optional note field. -->+ <string name="parking_note_hint">Add a note (level, section…)</string>+ <!-- Parking sheet: clears the saved parking spot. Verb. -->+ <string name="parking_clear">Clear</string> </resources>