Udostępnij za pośrednictwem


WindowManagerLayoutParams.LayoutInDisplayCutoutModeDefault Field

Definition

Caution

This constant will be removed in the future version. Use Android.Views.LayoutInDisplayCutoutMode enum directly instead of this field.

The window is allowed to extend into the DisplayCutout area, only if the DisplayCutout is fully contained within a system bar or the DisplayCutout is not deeper than 16 dp, but this depends on the OEM choice.

[Android.Runtime.Register("LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT", ApiSince=28)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Views.LayoutInDisplayCutoutMode enum directly instead of this field.", true)]
public const Android.Views.LayoutInDisplayCutoutMode LayoutInDisplayCutoutModeDefault = 0;
[<Android.Runtime.Register("LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT", ApiSince=28)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Views.LayoutInDisplayCutoutMode enum directly instead of this field.", true)>]
val mutable LayoutInDisplayCutoutModeDefault : Android.Views.LayoutInDisplayCutoutMode

Field Value

Value = 0

Implements

Attributes

Remarks

The window is allowed to extend into the DisplayCutout area, only if the DisplayCutout is fully contained within a system bar or the DisplayCutout is not deeper than 16 dp, but this depends on the OEM choice. Otherwise, the window is laid out such that it does not overlap with the DisplayCutout area.

In practice, this means that if the window did not set #FLAG_FULLSCREEN or View#SYSTEM_UI_FLAG_FULLSCREEN, it can extend into the cutout area in portrait if the cutout is at the top edge. Similarly for View#SYSTEM_UI_FLAG_HIDE_NAVIGATION and a cutout at the bottom of the screen. Otherwise (i.e. fullscreen or landscape) it is laid out such that it does not overlap the cutout area.

The usual precautions for not overlapping with the status and navigation bar are sufficient for ensuring that no important content overlaps with the DisplayCutout.

Note: OEMs can have an option to allow the window to always extend into the DisplayCutout area, no matter the cutout flag set, when the DisplayCutout is on the different side from system bars, only if the DisplayCutout overlaps at most 16dp with the windows. In such case, OEMs must provide an opt-in/out affordance for users.

Java documentation for android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT.

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