{"id":270133,"date":"2025-02-01T02:06:49","date_gmt":"2025-02-01T02:06:49","guid":{"rendered":"https:\/\/michigandigitalnews.com\/index.php\/2025\/02\/01\/changes-to-orientation-and-resizability-apis-in-android-16\/"},"modified":"2025-06-25T17:09:31","modified_gmt":"2025-06-25T17:09:31","slug":"changes-to-orientation-and-resizability-apis-in-android-16","status":"publish","type":"post","link":"https:\/\/michigandigitalnews.com\/index.php\/2025\/02\/01\/changes-to-orientation-and-resizability-apis-in-android-16\/","title":{"rendered":"Changes to orientation and resizability APIs in Android 16"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div>\n<meta content=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhmQqZ7VvbZkwrbocrk-dKTUW_cRjjftPgAkJwPv-rm-h8sG90w03nafxe3H-ltfCvgU7gzpK0a5n2I_p0_PVcgFj1MftaIXbNFfRNbBVbwPt3aAh5yt3ksesAsHA-yaQFBX6Opec2KGrYtONACXd3dezufwU-YcjQ71BOg5mMdKMH2RZ7z3CY4BgEfS3U\/s1600\/AfD%20_%20%20Android%2016%20Beta%201%20Blog%20Assets%20_%20Blog%20Header%20and%20Metadata%20Card_meta%20card.png\" name=\"twitter:image\"\/><br \/>\n<img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhmQqZ7VvbZkwrbocrk-dKTUW_cRjjftPgAkJwPv-rm-h8sG90w03nafxe3H-ltfCvgU7gzpK0a5n2I_p0_PVcgFj1MftaIXbNFfRNbBVbwPt3aAh5yt3ksesAsHA-yaQFBX6Opec2KGrYtONACXd3dezufwU-YcjQ71BOg5mMdKMH2RZ7z3CY4BgEfS3U\/s1600\/AfD%20_%20%20Android%2016%20Beta%201%20Blog%20Assets%20_%20Blog%20Header%20and%20Metadata%20Card_meta%20card.png\" style=\"display: none;\"\/><\/p>\n<p><em>Posted by  Maru Ahues Bouza \u2013 Director, Product Management<\/em><\/p>\n<p><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhzRItaoZNxXwt1uVdUHwtDpRRjmvA8Qa6FYS3w9JtJELwnHDLqgufyNq8y-aJs6jfKDBlp4N-csrChTjNzvUzjPd3qNxEoNhh1jeGd5sc8JEisPjzemFjGDSFccyYOu9Y4C1weqZfgtG51-FRrfrwIHPCHURgV_70tAyeEwUrAOxoxUG9_jaJoX1y9vE0\/s1600\/AfD%20_%20%20Android%2016%20Beta%201%20Blog%20Assets%20_%20Blog%20Header%20and%20Metadata%20Card_banner.png\"><img decoding=\"async\" border=\"0\" data-original-height=\"800\" data-original-width=\"100%\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhzRItaoZNxXwt1uVdUHwtDpRRjmvA8Qa6FYS3w9JtJELwnHDLqgufyNq8y-aJs6jfKDBlp4N-csrChTjNzvUzjPd3qNxEoNhh1jeGd5sc8JEisPjzemFjGDSFccyYOu9Y4C1weqZfgtG51-FRrfrwIHPCHURgV_70tAyeEwUrAOxoxUG9_jaJoX1y9vE0\/s1600\/AfD%20_%20%20Android%2016%20Beta%201%20Blog%20Assets%20_%20Blog%20Header%20and%20Metadata%20Card_banner.png\"\/><\/a><\/p>\n<p>With 3+ billion Android devices in use globally, the Android ecosystem is more vibrant than ever. Android mobile apps run on a diverse range of devices, from phones and foldables to tablets, Chromebooks, cars, and most recently XR. Users buy into an entire device ecosystem and expect their apps to work across all devices. To thrive in this multi-device environment, your apps need to adapt seamlessly to different screen sizes and form factors.<\/p>\n<p>Many Android apps rely on user interface approaches that work in a single orientation and\/or restrict resizability. However, users want apps to make full use of their large screens, so Android device manufacturers added well-received features that override these app restrictions.<\/p>\n<p>With this in mind, Android 16 is removing the ability for apps to restrict orientation and resizability at the platform level, and shifting to a consistent model of <a href=\"https:\/\/developer.android.com\/adaptive-apps\" target=\"_blank\" rel=\"noopener\">adaptive apps<\/a> that seamlessly adjust to different screen sizes and orientations. This change will reduce fragmentation with behavior that better meets user expectations, and improves accessibility by respecting the user\u2019s preferred orientation. We&#8217;re building tools, libraries, and platform APIs to help you do this to provide a consistently excellent user experience across the entire Android ecosystem.<\/p>\n<h3>What&#8217;s changing?<\/h3>\n<p>Starting with Android 16, we&#8217;re phasing out manifest attributes and runtime APIs used to restrict an app&#8217;s orientation and resizability, enabling better user experiences for many apps across devices.<\/p>\n<p>These changes will initially apply when the app is running on a large screen, where \u201clarge screen\u201d means that the smaller dimension of the display is greater than or equal to 600dp. This includes:<\/p>\n<ul>\n<ul>\n<li>Inner displays of large screen foldables<\/li>\n<li>Tablets, including desktop windowing<\/li>\n<li>Desktop environments, including Chromebooks<\/li>\n<\/ul>\n<\/ul>\n<p>The following manifest attributes and APIs will be ignored for apps targeting Android 16 (SDK 36) on large screens:<\/p>\n<div align=\"center\">\n<table>\n<tr>\n<td><b>Manifest attributes\/API<\/b><\/td>\n<td><b>Ignored values<\/b><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/developer.android.com\/guide\/topics\/manifest\/activity-element#screen\" target=\"_blank\" rel=\"noopener\">screenOrientation<\/a><\/td>\n<td>portrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/Activity#setRequestedOrientation%28int%29\" target=\"_blank\" rel=\"noopener\">setRequestedOrientation()<\/a><\/td>\n<td>portrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/developer.android.com\/guide\/topics\/manifest\/application-element#resizeableActivity\" target=\"_blank\" rel=\"noopener\">resizeableActivity<\/a><\/td>\n<td>all<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/developer.android.com\/reference\/android\/R.attr#minAspectRatio\" target=\"_blank\" rel=\"noopener\">minAspectRatio<\/a><\/td>\n<td>all<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/developer.android.com\/reference\/android\/R.attr#maxAspectRatio\" target=\"_blank\" rel=\"noopener\">maxAspectRatio<\/a><\/td>\n<td>all<\/td>\n<\/tr>\n<\/table><\/div>\n<p>There are some exceptions to these changes for controlling orientation, aspect ratio, and resizability:<\/p>\n<ul>\n<ul>\n<li>As mentioned before, these changes won&#8217;t apply for screens that are smaller than sw600dp (e.g. most phones, flippables, outer displays on large screen foldables)<\/li>\n<\/ul>\n<\/ul>\n<p>Also, users have control. They can explicitly opt-in to using the app\u2019s default behavior in the <a href=\"https:\/\/developer.android.com\/guide\/practices\/device-compatibility-mode#user_per-app_overrides\" target=\"_blank\" rel=\"noopener\">aspect ratio settings<\/a>.<\/p>\n<p><image><\/p>\n<div style=\"text-align: center;\"><img fetchpriority=\"high\" decoding=\"async\" alt=\"Two hands hold a folding phone, showing the Developer News feed in both the folded and unfolded states. The unfolded view shows more news items.\" border=\"0\" height=\"360\" id=\"imgCaption\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgKxgc_eab40yKECqgwds3zvkDle2fG1UsRtIXMDHur_3IQrZiDEhKJ_AtXsq8bCg8sYNPKJkotyCQYf9xwLb1Mzj7BHtSQBMWlYWIlS42y8BmJ5sRaRHdGqaqt6J10RuXaSvAyOU68oxuhTvfAmKgtpi9UylaLuYQ4folY4PvmBUIZ61T76XhWZw7zupc\/w640-h360\/image2.png\" width=\"640\"\/><\/div>\n<p><imgcaption><center><em>Apps, targeting API level 36, that were previously letterboxed on large screen devices will fill the display in landscape orientation on Android 16<\/em><\/center><\/imgcaption><\/image><\/p>\n<h2><span style=\"font-size: x-large;\">Get ready for this change, by making your app adaptive<\/span><\/h2>\n<p>Apps will need to support landscape and portrait layouts for window sizes in the full range of aspect ratios that users can choose to use apps in, as there will no longer be a way to restrict the aspect ratio and orientation to portrait or to landscape.<\/p>\n<p>To test if your app will be impacted by these changes, use the Android 16 Beta 1 developer preview with the Pixel Tablet and Pixel Fold series emulators in Android Studio, and either set <span style=\"color: #0d904f; font-family: Courier;\">targetSdkPreview = \u201cBaklava\u201d<\/span> or use the <a href=\"https:\/\/developer.android.com\/guide\/app-compatibility\/test-debug\" target=\"_blank\" rel=\"noopener\">app compatibility framework<\/a> by enabling the <span style=\"color: #0d904f; font-family: Courier;\">UNIVERSAL_RESIZABLE_BY_DEFAULT<\/span> flag.<\/p>\n<p>For existing apps that restrict orientation and aspect ratio, these changes may result in problems like overlapping layouts. To solve these issues and meet user expectations, our vision is that apps are built to be adaptive, to provide an optimal experience whether someone is using the app on a phone, foldable, tablet, Chromebook, XR or in a car.<\/p>\n<h3><span style=\"font-size: large;\">Resolving common problems<\/span><\/h3>\n<ul>\n<ul>\n<li><b>Avoid stretched UI components:<\/b> If layouts were designed and built with the assumption of phone screens, then app functionality may break for other aspect ratios. For example, if a layout was built assuming a portrait aspect ratio, then UI elements that fill the max width of the window will appear stretched in landscape-oriented windows. If layouts aren\u2019t built to scroll, then users may not be able to click on buttons or other UI elements that are offscreen, resulting in confusing or broken behavior. Add a <a href=\"https:\/\/developer.android.com\/reference\/kotlin\/androidx\/compose\/ui\/Modifier#%28androidx.compose.ui.Modifier%29.widthIn%28androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp%29\" target=\"_blank\" rel=\"noopener\">maximum width<\/a> to components to avoid stretching, and add <a href=\"https:\/\/developer.android.com\/develop\/ui\/compose\/touch-input\/pointer-input\/scroll\" target=\"_blank\" rel=\"noopener\">scrolling<\/a> to ensure all content is reachable.<\/li>\n<\/ul>\n<ul>\n<li><b>Preserve state across when window size changes:<\/b> Removing orientation and aspect ratio restrictions also means that the window sizes of apps will change more frequently in response to how the user prefers to use an app, such as by rotating, folding, or resizing an app in multi-window or free-form windowing modes. Orientation changes and resizing will result in Activity recreation by default. To ensure a good user experience, it is critical that <a href=\"https:\/\/developer.android.com\/topic\/libraries\/architecture\/saving-states\" target=\"_blank\" rel=\"noopener\">app state is preserved<\/a> through these configuration changes so that users don\u2019t lose their place in the app when changing posture or changing windowing modes.<\/li>\n<\/ul>\n<\/ul>\n<p>To account for different window sizes and aspect ratios, use <a href=\"https:\/\/developer.android.com\/develop\/ui\/compose\/layouts\/adaptive\/use-window-size-classes\" target=\"_blank\" rel=\"noopener\">window size classes<\/a> to drive layout behavior in a way that doesn\u2019t require device-specific customizations. Apps should also be built with the assumption that window sizes will frequently change. It\u2019s not necessary to build duplicate orientation-specific layouts &#8211; instead, ensure your existing UIs can re-layout well no matter what the window size is. If you have a landscape- or portrait-specific layout, those layouts will still be used.<\/p>\n<h3><span style=\"font-size: large;\">Optimizing for window sizes by building adaptive<\/span><\/h3>\n<p>If you&#8217;re already building <a href=\"https:\/\/developer.android.com\/develop\/ui\/compose\/layouts\/adaptive\" target=\"_blank\" rel=\"noopener\">adaptive layouts<\/a> and supporting all orientations, you&#8217;re set up for success as your app will be prepared for each of the device types and windowing modes your users want to use your app in and these changes should have minimal impact.<\/p>\n<p>We&#8217;ve also got a range of testing resources to help you guarantee reliability. You can automate testing with tools like the Espresso testing framework and Jetpack Compose testing APIs.<\/p>\n<p><a href=\"https:\/\/android-developers.googleblog.com\/2024\/10\/flipaclip-optimizes-for-tablets-and-stylus.html\" target=\"_blank\" rel=\"noopener\">FlipaClip<\/a> is a great example of why building for multiple form-factors matters: they saw 54% growth in tablet users in the four months after they optimized their app to be adaptive.<\/p>\n<h3><span style=\"font-size: large;\">Timeline<\/span><\/h3>\n<p>We understand that the changes are significant for apps that have traditionally only supported portrait orientation. UI issues like buttons going off screen, overlapping content, or screens with camera viewfinders may need adjustments.<\/p>\n<p>To help you plan ahead and make the necessary adjustments, here\u2019s the planned timeline outlining when these changes will take effect:<\/p>\n<ul>\n<ul>\n<li><b>Android 16 (2025):<\/b> Changes described above will be the baseline experience for large screen devices (smallest screen width &gt; 600dp) for apps that target API level 36, with the option for developers to opt-out.<\/li>\n<\/ul>\n<ul>\n<li><b>Android release in 2026:<\/b> Changes described above will be the baseline experience for large screen devices (smallest screen width &gt;600dp) for apps that target API level 37. Developers will not have an option to opt-out.<\/li>\n<\/ul>\n<\/ul>\n<div align=\"center\">\n<table>\n<tr>\n<td><b>Target API level<\/b><\/td>\n<td><b>Applicable devices<\/b><\/td>\n<td><b>Developer opt-out allowed<\/b><\/td>\n<\/tr>\n<tr>\n<td>36 (Android 16)<\/td>\n<td>Large screen devices (smallest screen width &gt;600dp)<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>37 (Anticipated)<\/td>\n<td>Large screen devices (smallest screen width &gt;600dp)<\/td>\n<td>No<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The deadlines for targeting a specific API level are app store specific. For Google Play, the plan is that targeting API 36 will be required in August 2026 and targeting API 37 will  be required in August 2027.<\/p>\n<h2><span style=\"font-size: x-large;\">Preparing for Android 16<\/span><\/h2>\n<p>Refer to the <a href=\"https:\/\/developer.android.com\/about\/versions\/16\/behavior-changes-16\" target=\"_blank\" rel=\"noopener\">Android 16 changes page<\/a> for all changes impacting apps in Android 16, as well as additional resources for updating your apps if you are impacted. To test your app, download the Android 16 Beta 1 developer preview and update to <span style=\"color: #0d904f; font-family: Courier;\">targetSdkPreview = \u201cBaklava\u201d<\/span> or use the <a href=\"https:\/\/developer.android.com\/guide\/app-compatibility\/test-debug\" target=\"_blank\" rel=\"noopener\">app compatibility framework<\/a> to enable specific changes.<\/p>\n<p>We&#8217;re committed to helping developers embrace this new era of <a href=\"https:\/\/developer.android.com\/adaptive-apps\" target=\"_blank\" rel=\"noopener\">adaptive apps<\/a> and unlock the full potential of their apps across the diverse Android ecosystem. Check out the <a href=\"https:\/\/developer.android.com\/develop\/ui\/compose\/layouts\/adaptive\/adaptive-dos-and-donts\" target=\"_blank\" rel=\"noopener\">do\u2019s and don\u2019ts<\/a> for designing and building across multiple window sizes and form factors, as well how to <a href=\"https:\/\/developer.android.com\/training\/testing\/different-screens\" target=\"_blank\" rel=\"noopener\">test<\/a> across the variety of devices that your app will be used in.<\/p>\n<p>Stay tuned for more updates and resources as we approach the release of Android 16!<\/p>\n<\/div>\n<p>[ad_2]<br \/>\n<br \/><a href=\"http:\/\/android-developers.googleblog.com\/2025\/01\/orientation-and-resizability-changes-in-android-16.html\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Posted by Maru Ahues Bouza \u2013 Director, Product Management With 3+ billion Android devices in use globally, the Android ecosystem is more vibrant than<\/p>\n","protected":false},"author":1,"featured_media":270134,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[146],"tags":[],"_links":{"self":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/270133"}],"collection":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/comments?post=270133"}],"version-history":[{"count":0,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/270133\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media\/270134"}],"wp:attachment":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media?parent=270133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/categories?post=270133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/tags?post=270133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}