Skip to content

Commit c0151b2

Browse files
docs(screen-orientation): Android 16 large screen restrictions (#2414)
1 parent 4c2f39a commit c0151b2

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

screen-orientation/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ lock(options: OrientationLockOptions) => Promise<void>
6969

7070
Locks the screen orientation.
7171

72+
Starting in Android targetSdk 36, this method has no effect for large screens (e.g. tablets) on Android 16 an higher.
73+
You may opt-out of this behavior in your app by adding `&lt;property android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY" android:value="true" /&gt;` to your `AndroidManifest.xml` inside `&lt;application&gt;` or `&lt;activity&gt;`.
74+
Keep in mind though that this opt-out is temporary will no longer work for Android 17. Android discourages setting specific orientations for large screens.
75+
Regular Android phones are unaffected by this change.
76+
For more information check the Android docs at https://developer.android.com/about/versions/16/behavior-changes-16#adaptive-layouts
77+
7278
| Param | Type |
7379
| ------------- | ------------------------------------------------------------------------- |
7480
| **`options`** | <code><a href="#orientationlockoptions">OrientationLockOptions</a></code> |

screen-orientation/src/definitions.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ export interface ScreenOrientationPlugin {
3232
/**
3333
* Locks the screen orientation.
3434
*
35+
* Starting in Android targetSdk 36, this method has no effect for large screens (e.g. tablets) on Android 16 an higher.
36+
* You may opt-out of this behavior in your app by adding `<property android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY" android:value="true" />` to your `AndroidManifest.xml` inside `<application>` or `<activity>`.
37+
* Keep in mind though that this opt-out is temporary will no longer work for Android 17. Android discourages setting specific orientations for large screens.
38+
* Regular Android phones are unaffected by this change.
39+
* For more information check the Android docs at https://developer.android.com/about/versions/16/behavior-changes-16#adaptive-layouts
40+
*
3541
* @since 4.0.0
3642
*/
3743
lock(options: OrientationLockOptions): Promise<void>;

0 commit comments

Comments
 (0)