Udostępnij za pośrednictwem


DisplayManager.GetDisplays Method

Definition

Overloads

GetDisplays()

Gets all currently valid logical displays.

GetDisplays(String)

Gets all currently valid logical displays of the specified category.

GetDisplays()

Gets all currently valid logical displays.

[Android.Runtime.Register("getDisplays", "()[Landroid/view/Display;", "")]
public Android.Views.Display[]? GetDisplays ();
[<Android.Runtime.Register("getDisplays", "()[Landroid/view/Display;", "")>]
member this.GetDisplays : unit -> Android.Views.Display[]

Returns

An array containing all displays.

Attributes

Remarks

Gets all currently valid logical displays.

Java documentation for android.hardware.display.DisplayManager.getDisplays().

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

GetDisplays(String)

Gets all currently valid logical displays of the specified category.

[Android.Runtime.Register("getDisplays", "(Ljava/lang/String;)[Landroid/view/Display;", "")]
public Android.Views.Display[]? GetDisplays (string? category);
[<Android.Runtime.Register("getDisplays", "(Ljava/lang/String;)[Landroid/view/Display;", "")>]
member this.GetDisplays : string -> Android.Views.Display[]

Parameters

category
String

The requested display category or null to return all displays.

Returns

An array containing all displays sorted by order of preference.

Attributes

Remarks

Gets all currently valid logical displays of the specified category.

When there are multiple displays in a category the returned displays are sorted of preference. For example, if the requested category is #DISPLAY_CATEGORY_PRESENTATION and there are multiple presentation displays then the displays are sorted so that the first display in the returned array is the most preferred presentation display. The application may simply use the first display or allow the user to choose.

Java documentation for android.hardware.display.DisplayManager.getDisplays(java.lang.String).

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.

See also

Applies to