WindowManager.PropertyCameraCompatAllowSimulateRequestedOrientation Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Use 'Android.Views.IWindowManager.PropertyCameraCompatAllowSimulateRequestedOrientation'. This class will be removed in a future release.
Application-level [PackageManager][android.
[Android.Runtime.Register("PROPERTY_CAMERA_COMPAT_ALLOW_SIMULATE_REQUESTED_ORIENTATION", ApiSince=36)]
[System.Obsolete("Use 'Android.Views.IWindowManager.PropertyCameraCompatAllowSimulateRequestedOrientation'. This class will be removed in a future release.")]
public const string PropertyCameraCompatAllowSimulateRequestedOrientation;
[<Android.Runtime.Register("PROPERTY_CAMERA_COMPAT_ALLOW_SIMULATE_REQUESTED_ORIENTATION", ApiSince=36)>]
[<System.Obsolete("Use 'Android.Views.IWindowManager.PropertyCameraCompatAllowSimulateRequestedOrientation'. This class will be removed in a future release.")>]
val mutable PropertyCameraCompatAllowSimulateRequestedOrientation : string
Field Value
- Attributes
Remarks
Application-level [PackageManager][android.content.pm.PackageManager.Property] tag that (when set to false) informs the system the app has opted out of the camera compatibility treatment for fixed-orientation apps, which simulates running on a portrait device, in the orientation requested by the app.
This treatment aims to mitigate camera issues on large screens, like stretched or sideways previews. It simulates running on a portrait device by: <ul> <li>Letterboxing the app window, <li>Cropping the camera buffer to match the app's requested orientation, <li>Setting the camera sensor orientation to portrait. <li>Setting the display rotation to match the app's requested orientation, given portrait natural orientation, <li>Refreshes the activity to trigger new camera setup, with sandboxed values. </ul>
To opt out of the camera compatibility treatment, add this property to your app manifest and set the value to false.
Not setting this property at all, or setting this property to true has no effect.
<b>Syntax:</b>
<application>
<property
android:name="android.window.PROPERTY_CAMERA_COMPAT_ALLOW_SIMULATE_REQUESTED_ORIENTATION"
android:value="true|false"/>
</application>
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.