Skip to main content

Rotation Without Resets: Keep Forms and Actions in Place

What a mobile app should preserve when rotating a screen, including entered text, selection, scroll context, keyboard visibility and pending actions.

R
Written by Reiko

A successful orientation change does more than rearrange buttons. A user editing a form should still find the entered text and the next relevant action after the phone rotates. A selected item should remain selected. A request already being processed should not be submitted again because the interface has been rebuilt.

Android’s state-saving guidance identifies user input, navigation-related state, list position and the selected item as examples of state that can need preservation. In Compose, the appropriate storage mechanism depends on where the state belongs and what must survive. A visual redesign cannot compensate for losing that information during recreation.

Start with the interrupted task

Consider an address form. The user has entered a street, selected a delivery option and reached an invalid postal-code field. Rotating into landscape should not return the form to its initial values or remove the error explanation while leaving the same invalid value.

The exact scroll coordinate may be less useful than the user’s place in the task. When the layout changes from one column to a wider composition, restoring a raw position can reveal the wrong content. Preserve the relevant item or field context and check that it remains reachable in the new arrangement.

Focus requires similar attention. The active field should remain clear, and a changed layout should not move focus unexpectedly to an unrelated command. Test the resulting behavior with touch, an external keyboard and assistive technology rather than assuming the same visual position guarantees the same reading order.

The keyboard changes the space again

Rotation and keyboard appearance can happen together. A bottom action bar that was visible before typing can become obscured or consume too much of a short landscape window. Android’s inset tools help coordinate layout with system and keyboard regions. Apple’s safe-area guidance likewise distinguishes usable control placement from decorative content extending toward an edge.

For a form, let the user reach the active field, its validation message and the submission action through normal interaction. That may mean a scrollable form, an action placed in a less intrusive area, or a simpler editing composition. The right choice depends on the task; it should not require dismissing the keyboard merely to discover whether the form has an error.

Do not replay a command during layout restoration

A submitted upload, purchase or save request needs its own operation state. Restoring a screen should present the current pending or completed result, not issue the command again as a side effect of drawing the controls. Use a suitable application-level request strategy; orientation handling alone cannot guarantee that duplicate operations are impossible.

A useful review separates what the user sees from what the system has done:

  • Entered values and choices remain available after rotation.

  • The selected content and meaningful scroll context are retained.

  • An active operation still has an understandable status.

  • A completed action does not reappear as an unsent form.

  • A failed action preserves enough input for correction or an intentional retry.

Run the transition, not just the screenshots

Begin editing in portrait, show the keyboard, rotate to landscape, correct an error and rotate back. Then repeat while a request is pending and while the app is restored after a supported recreation scenario. Inspect both the visible controls and the actual request history.

These checks reveal failures that two static mockups cannot: repeated submissions, lost selections and actions hidden behind the keyboard. A layout is ready when the user can continue the same task after the transition without rebuilding their work.

Did this answer your question?