DisplayManagerCompat

public final class DisplayManagerCompat


Helper for accessing features in android.hardware.display.DisplayManager.

Summary

Constants

static final String

Display category: Presentation displays.

Public constructors

Public methods

@Nullable Display
getDisplay(int displayId)

Gets information about a logical display.

Display[]

Gets all currently valid logical displays.

Display[]

Gets all currently valid logical displays of the specified category.

static @NonNull DisplayManagerCompat

Gets an instance of the display manager given the context.

Constants

DISPLAY_CATEGORY_PRESENTATION

public static final String DISPLAY_CATEGORY_PRESENTATION

Display category: Presentation displays.

This category can be used to identify secondary displays that are suitable for use as presentation displays.

See also
Presentation

for information about presenting content on secondary displays.

getDisplays

Public constructors

DisplayManagerCompat

public final DisplayManagerCompat()

Public methods

getDisplay

public @Nullable Display getDisplay(int displayId)

Gets information about a logical display. The display metrics may be adjusted to provide compatibility for legacy applications.

Parameters
int displayId

The logical display id.

Returns
@Nullable Display

The display object, or null if there is no valid display with the given id.

getDisplays

public Display[] getDisplays()

Gets all currently valid logical displays.

Returns
Display[]

An array containing all displays.

getDisplays

public Display[] getDisplays(@Nullable