次の方法で共有


WindowManagerLayoutParams.LayoutInDisplayCutoutModeShortEdges 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 always allowed to extend into the DisplayCutout areas on the short edges of the screen.

[Android.Runtime.Register("LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES", 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 LayoutInDisplayCutoutModeShortEdges = 1;
[<Android.Runtime.Register("LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES", 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 LayoutInDisplayCutoutModeShortEdges : Android.Views.LayoutInDisplayCutoutMode

Field Value

Value = 1

Implements

Attributes

Remarks

The window is always allowed to extend into the DisplayCutout areas on the short edges of the screen.

The window will never extend into a DisplayCutout area on the long edges of the screen, unless the DisplayCutout is not deeper than 16 dp, but this depends on the OEM choice.

Note: OEMs can have an option to allow the window to extend into the DisplayCutout area on the long edge side, only if the cutout overlaps at most 16dp with the windows. In such case, OEMs must provide an opt-in/out affordance for users.

The window must make sure that no important content overlaps with the DisplayCutout.

In this mode, the window extends under cutouts on the short edge of the display in both portrait and landscape, regardless of whether the window is hiding the system bars:<br/> <img src="https://developer.android.com/reference/android/images/display_cutout/short_edge/fullscreen_top_no_letterbox.png" height="720" alt="Screenshot of a fullscreen activity on a display with a cutout at the top edge in portrait, no letterbox is applied."/>

<img src="https://developer.android.com/reference/android/images/display_cutout/short_edge/landscape_top_no_letterbox.png" width="720" alt="Screenshot of an activity on a display with a cutout at the top edge in landscape, no letterbox is applied."/>

A cutout in the corner is considered to be on the short edge: <br/> <img src="https://developer.android.com/reference/android/images/display_cutout/short_edge/fullscreen_corner_no_letterbox.png" height="720" alt="Screenshot of a fullscreen activity on a display with a cutout in the corner in portrait, no letterbox is applied."/>

On the other hand, should the cutout be on the long edge of the display, a letterbox will be applied such that the window does not extend into the cutout on either long edge: <br/> <img src="https://developer.android.com/reference/android/images/display_cutout/short_edge/portrait_side_letterbox.png" height="720" alt="Screenshot of an activity on a display with a cutout on the long edge in portrait, letterbox is applied."/>

Note: Android might not allow the content view to overlap the system bars in view level. To override this behavior and allow content to be able to extend into the cutout area, call Window#setDecorFitsSystemWindows(boolean) with false.

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

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