共用方式為


PackageManager.PropertyCompatOverrideLandscapeToPortrait Field

Definition

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app can be opted-in or opted-out from the compatibility treatment that rotates camera output by 90 degrees on landscape sensors on devices known to have compatibility issues.

[Android.Runtime.Register("PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT", ApiSince=34)]
public const string PropertyCompatOverrideLandscapeToPortrait;
[<Android.Runtime.Register("PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT", ApiSince=34)>]
val mutable PropertyCompatOverrideLandscapeToPortrait : string

Field Value

Attributes

Remarks

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app can be opted-in or opted-out from the compatibility treatment that rotates camera output by 90 degrees on landscape sensors on devices known to have compatibility issues.

The treatment is disabled by default but device manufacturers can enable the treatment using their discretion to improve camera compatibility. With this property set to false, the rotation will not be applied. A value of true will ensure that rotation is applied, provided it is enabled for the device. In most cases, if rotation is the desired behavior this property need not be set. However, if your app experiences stretching or incorrect rotation on these devices, explicitly setting this to true may resolve that behavior. Apps should set this to false if there is confidence that the app handles android.hardware.camera2.CameraCharacteristics#SENSOR_ORIENTATION correctly. See the documentation for best practice.

<b>Syntax:</b>

&lt;application&gt;
              &lt;property
                android:name="android.camera.PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT"
                android:value="true|false"/&gt;
            &lt;/application&gt;

Java documentation for android.content.pm.PackageManager.PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT.

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.

Applies to