Display
public
final
class
Display
extends Object
| java.lang.Object | |
| ↳ | android.view.Display |
Provides information about the size and density of a logical display.
The display area is described in two different ways.
- The application display area specifies the part of the display that may contain
an application window, excluding the system decorations. The application display area may
be smaller than the real display area because the system subtracts the space needed
for decor elements such as the status bar. Use
WindowMetrics.getBounds()to query the application window bounds. - The real display area specifies the part of the display that is accessible to an application
in the current system state. The real display area may be smaller than the physical size of the
display in a few scenarios. Use
WindowManager.getCurrentWindowMetrics()to identify the current size of the activity window. UI-related work, such as choosing UI layouts, should rely uponWindowMetrics.getBounds(). SeegetRealSize(Point)/getRealMetrics(DisplayMetrics)for details.
A logical display does not necessarily represent a particular physical display device such as the internal display or an external display. The contents of a logical display may be presented on one or more physical displays according to the devices that are currently attached and whether mirroring has been enabled.
Summary
Nested classes | |
|---|---|
class |
Display.HdrCapabilities
Encapsulates the HDR capabilities of a given display. |
class |
Display.Mode
A mode supported by a given display. |
Constants | |
|---|---|
int |
DEFAULT_DISPLAY
The default Display id, which is the id of the primary display assuming there is one. |
int |
FLAG_PRESENTATION
Display flag: Indicates that the display is a presentation display. |
int |
FLAG_PRIVATE
Display flag: Indicates that the display is private. |
int |
FLAG_ROUND
Display flag: Indicates that the display has a round shape. |
int |
FLAG_SECURE
Display flag: Indicates that the display has a secure video output and supports compositing secure surfaces. |
int |
|