Lingua

WindowMetrics Constructors

Definition

Overloads

Name Description
WindowMetrics(Rect, WindowInsets)

Initializes window metrics from bounds and window insets.

WindowMetrics(Rect, WindowInsets, Single)

The constructor to create a WindowMetrics instance.

WindowMetrics(Rect, WindowInsets)

Initializes window metrics from bounds and window insets.

[Android.Runtime.Register(".ctor", "(Landroid/graphics/Rect;Landroid/view/WindowInsets;)V", "", ApiSince=30)]
public WindowMetrics(Android.Graphics.Rect bounds, Android.Views.WindowInsets windowInsets);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/Rect;Landroid/view/WindowInsets;)V", "", ApiSince=30)>]
new Android.Views.WindowMetrics : Android.Graphics.Rect * Android.Views.WindowInsets -> Android.Views.WindowMetrics

Parameters

bounds
Rect

The Android.Graphics.Rect value used for bounds.

windowInsets
WindowInsets

The Android.Views.WindowInsets value used for window insets.

Attributes

Remarks

This member is deprecated. use #WindowMetrics(Rect, WindowInsets, float) instead.

Java documentation for android.view.WindowMetrics.WindowMetrics(android.graphics.Rect, android.view.WindowInsets).

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

WindowMetrics(Rect, WindowInsets, Single)

The constructor to create a WindowMetrics instance.

[Android.Runtime.Register(".ctor", "(Landroid/graphics/Rect;Landroid/view/WindowInsets;F)V", "", ApiSince=34)]
public WindowMetrics(Android.Graphics.Rect bounds, Android.Views.WindowInsets windowInsets, float density);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/Rect;Landroid/view/WindowInsets;F)V", "", ApiSince=34)>]
new Android.Views.WindowMetrics : Android.Graphics.Rect * Android.Views.WindowInsets * single -> Android.Views.WindowMetrics

Parameters

bounds
Rect

The window bounds

windowInsets
WindowInsets

The WindowInsets of the window

density
Single

The window density

Attributes

Remarks

The constructor to create a WindowMetrics instance.

Note that in most cases WindowMetrics is obtained from WindowManager#getCurrentWindowMetrics() or WindowManager#getMaximumWindowMetrics().

Java documentation for android.view.WindowMetrics.WindowMetrics(android.graphics.Rect, android.view.WindowInsets, float).

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