Skip to content

Save uiSettings and camera paddings across configuration changes - #25

Merged
wf9a5m75 merged 1 commit into
developfrom
fix/saver-state
Nov 7, 2026
Merged

wf9a5m75 merged 1 commit into
developfrom
fix/saver-state

Conversation

@wf9a5m75

@wf9a5m75 wf9a5m75 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

BaseMapViewSaver wrote only the camera position and whatever the provider
put in the design bundle, so after a rotation uiSettings came back all-true
and camera paddings were dropped.

  • MapViewStateBundle (@InternalMapConductorApi): shared Bundle encoding for
    attribution rules, MapUISettings, paddings and the camera. Plain Bundles
    and primitives only, so it survives Parcel / process death.
  • BaseMapViewSaver saves and restores uiSettings and camera paddings; old
    bundles without them still restore.
  • Device round-trip test through a real Parcel.

After a configuration change (screen rotation) the map state now keeps its design (id, style, attribution rules), uiSettings and camera paddings. Depends on android-sdk-core MapViewStateBundle; merge order core → compose → providers. Verified by rotating a Lenovo tablet (HA26Z6JL); instrumented tests pass the saved Bundle through a real Parcel.

BaseMapViewSaver wrote only the camera position and whatever the provider
put in the design bundle, so after a rotation uiSettings came back all-true
and camera paddings were dropped.

- MapViewStateBundle (@InternalMapConductorApi): shared Bundle encoding for
  attribution rules, MapUISettings, paddings and the camera. Plain Bundles
  and primitives only, so it survives Parcel / process death.
- BaseMapViewSaver saves and restores uiSettings and camera paddings; old
  bundles without them still restore.
- Device round-trip test through a real Parcel.
@wf9a5m75
wf9a5m75 merged commit e216c96 into develop Nov 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant