Foldables and large screens

Modern Android Mid-level Kotlin 2.0+ API 24+ Reviewed By Best Latest Apps

Pick the fix

An app sets screenOrientation="portrait"; on a tablet after targeting API 36 it shows a stretched phone UI in landscape. Fix?

Options
Hint 1 of 1

Does the orientation lock still apply on large screens?

Choose an answer, then open Show answer below to check it.

Show answer

Answer: A Adapt layout with window size classes, such as list-detail when expanded

Correct. The lock is ignored on large screens, so the layout must adapt.

Why not the others?
  • B Set orientation lock twice. Still ignored.
  • C Lower targetSdk. Only delays the problem.
  • D Block tablets in Play. Loses users.

30-second answer

Apps targeting Android 16 (API 36) can no longer lock orientation or resizability on large screens (smallest width 600dp and up); the system ignores those manifest settings. So layouts must adapt: use window size classes, canonical layouts like list-detail, keep state across resizes and folds, and handle the posture (half-open) with Jetpack WindowManager if useful.

Practise saying it · 30 s. No recording, just a timer

Explain large-screen changes.

Say your answer out loud, then check which of these points you covered:

  • API 36 ignores locks on large screens
  • Window size classes
  • Canonical layouts
  • Keep state on resize

Deep dive

Window size classes (compact, medium, expanded) drive layout choice.

Material 3 adaptive libraries give list-detail and supporting-pane scaffolds.

Games can opt out by category.

Test with the resizable emulator and desktop windowing.

Common mistakes

  • Locking portrait to avoid layout work.
  • Losing state on fold or resize.
  • Stretching phone layouts on tablets.

Senior take & follow-ups

Mention the API 36 rule, then size classes and canonical layouts.

Follow-up questions

Think of your answer first, then open the hint.

  1. What are window size classes?

    Show hint

    Breakpoints based on available window width and height.

  2. Which state should survive a fold?

    Show hint

    The same as any configuration change: scroll, input, selection.

Suggest a fix if something here is wrong or out of date.