-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add breaking change page for Android 17 orientation and resizability restrictions #13314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+59
−0
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
src/content/release/breaking-changes/android-large-screens-restrictions-ignored.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| --- | ||
| title: Large screen orientation and resizability restrictions ignored on Android 17 | ||
| description: >- | ||
| For apps targeting Android 17 or higher, orientation, resizability, and | ||
| aspect ratio restrictions no longer apply on large displays (widths 600dp or | ||
| larger). | ||
| --- | ||
|
|
||
| {% render "docs/breaking-changes.md" %} | ||
|
|
||
| ## Summary | ||
|
|
||
| For apps targeting Android 17 or higher, | ||
| orientation, resizability, and aspect ratio restrictions no longer apply | ||
| on displays with width 600dp or greater. | ||
| This means that [`SystemChrome.setPreferredOrientations`][] is ignored | ||
| on these devices. | ||
|
|
||
| ## Background | ||
|
|
||
| Android is shifting toward a model where apps are expected to adapt | ||
| to various orientations, display sizes, and aspect ratios. | ||
| Restrictions like fixed orientation or limited resizability hinder app | ||
| adaptability. | ||
| See [Android 17 behavior changes][] for more details. | ||
|
|
||
| In Android 16, this behavior was introduced as a default | ||
| but allowed apps to temporarily opt out | ||
| using the `PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY` manifest property. | ||
| Android 17 removes this opt-out. | ||
|
|
||
| ## Description of change | ||
|
|
||
| If you rely on [`SystemChrome.setPreferredOrientations`][] | ||
| to lock your app to a specific orientation, | ||
| it is ignored on large screens (widths 600dp and larger) | ||
| if your app targets Android 17 or higher. | ||
| If your app supports Android 16 | ||
| and you did not opt out of this behavior, | ||
| then it behaves the same on Android 17. | ||
|
|
||
| If your app relies on locking orientation, | ||
| make your app adaptive to support different screen sizes and orientations. | ||
| See the guidance for how to do this for large screens | ||
| in [Adaptive and responsive UI][]. | ||
|
|
||
| ## References | ||
|
|
||
| * [Android 17 behavior changes][] | ||
| * [Android 16 behavior changes][] | ||
| * [`SystemChrome.setPreferredOrientations`][] | ||
| * [Adaptive and responsive UI][] | ||
|
|
||
| [Android 17 behavior changes]: https://developer.android.com/about/versions/17/changes/ff-restrictions-ignored | ||
| [Android 16 behavior changes]: https://developer.android.com/about/versions/16/behavior-changes-16#ignore-orientation | ||
| [`SystemChrome.setPreferredOrientations`]: {{site.api}}/flutter/services/SystemChrome/setPreferredOrientations.html | ||
| [Adaptive and responsive UI]: /ui/adaptive-responsive/large-screens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.