How to change the aspect ratio in apps for foldable devices

  • Android 16 ignores orientation and aspect ratio restrictions on large screens (sw ≥ 600dp) to boost adaptive UIs.
  • Adopt Window Size Classes and responsive patterns in Compose to avoid stretching and preserve state.
  • Test on Pixel Tablet/Fold emulators and use rememberSaveable, ViewModel and compatibility tools.
  • For immediate adjustments, use full-screen apps one app at a time and carefully modify the density (smaller width).

How to configure the aspect ratio on foldable phones

If you're wondering how to change the aspect ratio in apps for foldable devices, you've come to the right place. Foldable phones and tablets have dramatically increased the diversity of sizes and orientations , and that directly affects how your apps look. Between new Android 16 policies, system settings, and design best practices, there's a lot to consider to ensure everything fits perfectly on compact, medium, and extended screens.

The picture is clear: Android is pushing for all apps to be resizable and respect the experience on large screens (tablets, desktop mode, and foldable internal displays). Even so, there are ways to adjust the aspect ratio per app, test in emulators, enable compatibility behaviors, and, if necessary, create exceptions. Let's go step by step, without beating around the bush.

What's changed in Android 16 (API 36): orientation, appearance, and size

With Android 16 (API level 36), the system can ignore app restrictions on orientation, aspect ratio, and resizing on large screens. This applies to devices with a smallest width (sw) ≥ 600dp : tablets, the internal screen of many foldable devices , and desktop window mode. The goal is to provide a consistent experience on large screens, respecting user preferences for orientation and size when there is sufficient space.

In apps that target API 36, activities become resizable by default and can enter multi-window mode if the device has a sw ≥ 600dp (equivalent to having resizeableActivity="true"). In practical terms, the system ignores several attributes that previously enforced fixed behavior on large screens.

Attributes ignored on large screens when targeting API 36

If your app targets Android 16, several manifest flags and related APIs are ignored on displays with a size ≥ 600dp. Among the attributes that no longer take effect are screenOrientation (portrait, landscape, and sensor/user variants), resizeableActivity, minAspectRatio, maxAspectRatio, and calls like setRequestedOrientation()/getRequestedOrientation() with those same fixed values.

How to turn a tablet into a laptop
Related article:
Turn your Android tablet into a laptop with a keyboard and mouse

This change prevents an app from being "stuck" in portrait mode or with a narrow aspect ratio when there's plenty of space to display content. The idea is to promote adaptive layouts and avoid unwanted stretching or cropping that frustrates users of large screens.

Exceptions: when these changes do not apply

aspect ratio in foldable mobile phones

Although the new model is stricter on large screens, there are exceptions. These overrides do not apply to screens with a resolution less than 600dp (many phones, some foldable phones in external mode), and games (category android:appCategory="game") are exempt. Furthermore, if the user enables the app's default behavior in the aspect ratio settings, that preference takes precedence.

If you publish games, Google Play can help you manage your app's category when using Android App Bundles and Play app signing, providing additional distribution benefits. For non-game apps, the key is to build a responsive UI and let the system manage the windowing.

How to disable behavior in API 36 and notice for API 37

If, for a well-justified reason, you need to opt out of this behavior in API 36, you can declare the manifest property "android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY". Set it in a specific activity or application-wide.

<activity ...>
    <property
        android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY"
        android:value="true" />
</activity>
<application ...>
    <property
        android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY"
        android:value="true" />
</application>

Note this: the framework will remove the "opt-out" option in API 37. This means that for apps targeting API 37 or higher, orientation, aspect ratio, and resizing restrictions will always be ignored on screens with a sw ≥ 600dp.

Testing on emulators and devices: how to reproduce real-world cases

To see if your app is affected by the changes, use the Pixel Tablet and Pixel Fold emulators in Android Studio . Define targetSdkPreview = "Baklava" in your module's build.gradle file and observe how your UI responds to changes in orientation, folding/unfolding, and window size.

You can also enable universal resizable behavior with the UNIVERSAL_RESIZABLE_BY_DEFAULT compatibility flag on your test devices. And for automated testing, Espresso and the Jetpack Compose test APIs let you validate entire flows with resizing, rotation, and multi-window changes.

Common problems with large screens and how to avoid them

Apps that rely on fixed orientation, a specific aspect ratio, or non-resizable activity often suffer in Android 16: stretched elements, overlapping, buttons out of viewport , and camera errors in previews. The solution lies in embracing a responsive design.

  • Avoid stretched components: Add maximum widths so that a card, toolbar, or image doesn't get out of control horizontally.
  • Enable scrolling where appropriate: if there is no displacement, the user may lose vital controls when switching to landscape mode.
  • Handle the camera with care in both orientations: Adjust viewfinder and rotation relative to the sensor; do not assume a fixed aspect ratio.
  • Preserves state when resizing: The activity can be recreated; it preserves form inputs and user context.
  • Use Window Size Classes: think in terms of size categories and in Responsive layouts that adapt to the space.

The user's voice: "My apps look weird on the Fold"

If you use a foldable phone like the Galaxy Fold and notice that Instagram or Reddit look overly enlarged or stretched, you're not alone. It's a symptom of apps that aren't optimized for large screens or are using forced scaling. In gaming, there are also titles that still don't take full advantage of the screen and look bad.

Are there any settings? Many manufacturers allow you to force full screen on a per-app basis. However, if an app isn't optimized, the result may be suboptimal . Ideally, developers should adopt adaptive layouts; as a user, check Settings > Display > Fullscreen apps (or App scaling) to manage each app individually.

Useful system settings: aspect ratio per app and density

In Android skins from various manufacturers, you'll find options to make certain apps run in full screen or at a specific aspect ratio. Common paths: Settings > Display > App scaling / Fullscreen apps . Enable it for each app and check the result.

If the content still doesn't fit, you can adjust the density (Smallest Width) in Developer Options . Enable Developer Options by tapping the Build number seven times (Settings > System > About phone), go to Developer Options, and adjust "Smallest Width": lowering the value makes everything larger; raising it makes it smaller. Do this step by step and note the original value.

For curved screens, some systems include "Ignore random edge touches" or "Accidental touch protection." The affected area can be customized on certain interfaces (for example, on some Xiaomi models). It doesn't fix the aspect ratio, but it reduces phantom touches while you're testing settings.

Compose and responsive design: window size classes

Jetpack Compose provides perfect tools for UIs that stretch without breaking. Window Size Classes (Material 3) simplify the logic by decoupling the layout from physical screen dimensions. Classify by width/height into Compact, Medium, and Expanded and adjust the UI accordingly.

In the root composable, you can obtain the size class and propagate it as state. Avoid design decisions based on "is it a tablet?" or a fixed aspect ratio ; the app can run in multi-window, on a screen segment, or on an external monitor.

For internal components, use their actual rendering width. BoxWithConstraints allows you to change WHAT is displayed based on space (for example, switching from a column to a row layout with details), assuming the cost of deferred compositing during the layout phase.

All content available, all the time

If a component displays more detail when there's sufficient width, don't load the data "based" on size . Always pass the data (e.g., imageUrl, title, description) and decide in the composable which parts are visible. This avoids side effects when resizing and preserves the state.

When the layout changes (from one to two columns, or vice versa), it's a good idea to elevate status flags like showMore to the top level. This preserves the user's intent even if the layout changes . In Compose, remember that rememberSaveable helps maintain state through Activity recreations.

Manifesto and restrictions that block resizing

If your app isn't resizing or is stuck at a specific aspect ratio, check your AndroidManifest.xml file. Remove `android:maxAspectRatio`, `android:resizeableActivity="false"`, and `screenOrientation` if you're optimizing for large or free-form displays. At API 36, these settings won't be very helpful for screens ≥ 600dp because the system will ignore them.

For legacy apps, this step is key: allowing the window to grow and shrink is the first major filter to ensure your UI responds well in desktop mode, split-screen mode, or when unfolding a foldable app.

Configuration changes and lifecycle

When you change the window size, the Configuration (width/height, orientation, aspect ratio) is updated . In classic views, you can see this with `onConfigurationChanged`; in Compose, `LocalConfiguration.current` automatically reflects these changes.

You'll also notice lifecycle implications. Since API 24, only significant size changes recreate the Activity , but it can still happen. Log events with a LifecycleEventObserver and check when the Activity is destroyed/created. If you connect an external monitor or the density changes, it might also be recreated.

Continuity of the state and background work

To preserve UI state across recreations, use `rememberSaveable` instead of `remember` when state needs to survive configuration changes. And elevate state to the `ViewModel` for true continuity between recreations, avoiding costly duplication of resources.

If initialization is triggered in onCreate(), it can be repeated. Move initialization to the ViewModel's init method so that it runs only once per ViewModel lifecycle. This is especially important if there are network calls or heavy I/O.

Web design for foldable books: CSS, APIs and performance

Folding mobiles
Related article:
The Ultimate Guide to Foldable Android Phones: Reviews, Comparisons, and Recommendations

For websites, the process is similar. Foldable content requires more precise media queries , not just standard breakpoints. Combine minimum/maximum width with aspect ratio for scenarios like 3:4 (folded portrait) or 16:9 (landscape). Reorganize menus, grids, and images according to the actual available space.

@media (min-width: 600px) and (max-width: 900px) {
  /* Pantallas intermedias: plegable semiabierto */
}
@media (aspect-ratio: 3/4) {
  /* Vertical plegado */
}
@media (aspect-ratio: 16/9) {
  /* Apaisado desplegado */
}

The Window Segments API helps detect active screen segments in multi-panel environments. It also handles viewport-fit: cover for rounded corners or cutouts, and detects orientation from JavaScript to adjust the UI without flickering. It optimizes performance with lazy loading and compression for typical foldable multitasking scenarios.

if (window.screenSegments) {
  const segments = window.screenSegments;
  console.log(segments);
}
/* CSS */
body { /* iOS/entornos compatibles */
  viewport-fit: cover;
}
/* JS */
if (screen.orientation.type === 'landscape-primary') {
  console.log('Modo apaisado');
}

Size classes: recommended thresholds and examples

Google recommends three width/height ranges in dp that work well for phones, foldables, and tablets: Compact (0–599 dp), Medium (600–839 dp), and Expanded (840+ dp) . A phone folded vertically might fall into the Medium range; when unfolded horizontally, it usually becomes Expanded.

Based on that, you can replace lists with 2–3 column grids when space allows, increase font sizes in Expanded, and maintain readability in Compact. Material 3 provides the `material3-window-size-class` for reliable calculation (remember that it may be experimental and requires an opt-in).

UI practices: reusable composables and layered logic

A good pattern is to centralize the sizing logic at one point (e.g., the root composable) and pass derived state to the rest. This prevents internal composables from implicitly depending on a global screen size, making them more reusable and testable.

For a responsive list-detail, decide at the top level whether to display one or two panels based on width , and let the children focus on the content. If a card displays extra information when there's more space, use BoxWithConstraints or modifiers, but don't lock the component to a single location or size.

Desktop and multi-window mode: get ready to move

On ChromeOS and Android desktop , the window resizes just like on a PC operating system. Your app should handle frequent size changes and maintain its state, without being locked by fixed orientation or static aspect ratio. Google's emulators and codelabs are a great way to test all of this methodically.

It's an ideal environment to validate that your app doesn't recalculate or over-reload when resized, and that layout transitions are smooth. If the user minimizes and returns, the app should resume without losing context.

Publication schedule and requirements

Android 16 sets a benchmark: compatibility with all orientations, aspect ratios and resizing on screens ≥ 600dp for apps targeting API 36 (with the possibility of disabling it in 36, but not in 37).

Deadlines vary by store, but Google Play will require target API 36 starting in August 2026. If you're still maintaining strict restrictions, it's time to plan your migration to avoid surprises and, above all, improve the experience on large screens.

Recommended resources and tests

For practice, Google offers codelabs focused on resizing: observe LocalConfiguration, log lifecycle , migrate manifest constraints, and enable rememberSaveable. The sample apps Reply, JetNews, and CanonicalLayouts demonstrate validated patterns for large screens.

For web teams, Chrome DevTools, BrowserStack, and Samsung Remote Test Lab facilitate testing in folded/unfolded states. And if you work with native Android, Pixel Tablet/Fold emulators and the UNIVERSAL_RESIZABLE_BY_DEFAULT compatibility framework are your playground.

Samsung Galaxy Z Flip specifications and features
Related article:
Samsung Galaxy Z Flip: Detailed specifications and features of the revolutionary foldable

A community note: expectations and reality

Many foldable phone users report having to manually adjust scaling on a case-by-case basis, and that some games look worse. This is understandable during an ecosystem transition, but Android 16 and its adaptive design practices pave the way for apps to truly take advantage of larger screens . The sooner you migrate, the sooner complaints about stretching and cropping will stop.

If, despite everything, you feel your device isn't offering the experience you expected, there are buyback and resale options for used phones. The original article mentioned services like Moviloff, which lets you turn your old phone into cash and give it a second life—something that also helps the environment. It's not a technical solution, but it might be of interest if you're thinking about upgrading your device.

Mastering aspect ratio and resizing in foldable apps means embracing the new model: letting the system manage large windows, building responsive UIs, preserving state, and testing in real-world scenarios . With Android 16 pushing in that direction (and Android 37 closing the door on restrictions for large screens), the path is clear: adopt Window Size Classes, clean up the manifest, avoid stretched components, enable scrolling, optimize the camera in both orientations, and measure performance.

You can change the screen refresh rate on an Android device.
Related article:
How to change the screen refresh rate on Android

If you need immediate adjustments, use system options like full-screen apps and, with caution, the "Smallest Width" setting. Users will notice the difference right away: more visible content, less distortion, and an experience worthy of a large screen. Share this information so more users can change the aspect ratio on their phones.


Add as preferred source in Google