Android.Views.Display.GetSize Method
Gets the size of the display, in pixels.

Syntax

[Android.Runtime.Register("getSize", "(Landroid/graphics/Point;)V", "GetGetSize_Landroid_graphics_Point_Handler")]
public virtual void GetSize (Android.Graphics.Point outSize)

Parameters

outSize
A Android.Graphics.Point object to receive the size information.

Remarks

Gets the size of the display, in pixels.

Note that this value should not be used for computing layouts, since a device will typically have screen decoration (such as a status bar) along the edges of the display that reduce the amount of application space available from the size returned here. Layouts should instead use the window size.

The size is adjusted based on the current rotation of the display.

The size returned by this method does not necessarily represent the actual raw size (native resolution) of the display. The returned size may be adjusted to exclude certain system decoration elements that are always visible. It may also be scaled to provide compatibility with older applications that were originally designed for smaller displays.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 13