You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using PagerState in a Compose screen, changing the screen orientation (triggering a configuration change) causes the PagerState to reset to its initial page (usually page 0), instead of preserving the current page index.
This behavior occurs because configuration changes recreate the screen, and PagerState is not automatically saved/restored unless explicitly handled by the developer. This leads to a poor user experience as the user loses their current position in the pager upon rotation.
Recording
Screen_recording_20250524_015546.mp4
Steps to Reproduce:
Swipe to any page other than the initial one (Prompt one).
Rotate the device (portrait to landscape).
Observe that the pager resets back to page 0.
Expected Behavior:
The pager should preserve and restore the current page index across configuration changes automatically, or at least provide built-in support or a recommended approach for doing so.