Display Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides information about the size and density of a logical display.
[Android.Runtime.Register("android/view/Display", DoNotGenerateAcw=true)]
public class Display : Java.Lang.Object
[<Android.Runtime.Register("android/view/Display", DoNotGenerateAcw=true)>]
type Display = class
inherit Object
- Inheritance
- Attributes
Remarks
Provides information about the size and density of a logical display.
The display area is described in two different ways. <ul> <li>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.</li> <li>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 upon WindowMetrics#getBounds()
. See #getRealSize
/ #getRealMetrics
for details.</li> </ul>
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.
Java documentation for android.view.Display
.
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.
Constructors
Display(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Fields
DefaultDisplay |
The default Display id, which is the id of the primary display assuming there is one. |
FlagPresentation |
Obsolete.
Display flag: Indicates that the display is a presentation display. |
FlagPrivate |
Obsolete.
Display flag: Indicates that the display is private. |
FlagRound |
Obsolete.
Display flag: Indicates that the display has a round shape. |
FlagSecure |
Obsolete.
Display flag: Indicates that the display has a secure video output and supports compositing secure surfaces. |
FlagSupportsProtectedBuffers |
Obsolete.
Display flag: Indicates that the display supports compositing content that is stored in protected graphics buffers. |
InvalidDisplay |
Invalid display id. |
Properties
AppVsyncOffsetNanos |
Gets the app VSYNC offset, in nanoseconds. |
Class |
Returns the runtime class of this |
Cutout |
Returns the |
DeviceProductInfo |
Returns the product-specific information about the display or the directly connected device on the display chain. |
DisplayId |
Gets the display id. |
Flags |
Returns a combination of flags that describe the capabilities of the display. |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
HdrSdrRatio | |
Height |
Obsolete.
This member is deprecated. |
IsHdr |
Returns whether this display supports any HDR type. |
IsHdrSdrRatioAvailable | |
IsMinimalPostProcessingSupported |
Returns true if the connected display can be switched into a mode with minimal post processing. |
IsValid |
Returns true if this display is still valid, false if the display has been removed. |
IsWideColorGamut |
Returns whether this display can be used to display wide color gamut content. |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
Name |
Gets the name of the display. |
Orientation |
Obsolete.
This member is deprecated. |
PeerReference | (Inherited from Object) |
PixelFormat |
Obsolete.
Gets the pixel format of the display. |
PreferredWideGamutColorSpace |
Returns the preferred wide color space of the Display. |
PresentationDeadlineNanos |
This is how far in advance a buffer must be queued for presentation at a given time. |
RefreshRate |
Gets the refresh rate of this display in frames per second. |
Rotation |
Returns the rotation of the screen from its "natural" orientation. |
Shape |
Returns the |
State |
Gets the state of the display, such as whether it is on or off. |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Width |
Obsolete.
This member is deprecated. |
Methods
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetCurrentSizeRange(Point, Point) |
Return the range of display sizes an application can expect to encounter under normal operation, as long as there is no physical change in screen size. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetHdrCapabilities() |
Returns the display's HDR capabilities. |
GetMetrics(DisplayMetrics) |
Gets the size and density of this display. |
GetMode() |
Returns the active mode of the display. |
GetRealMetrics(DisplayMetrics) |
Gets the size of the largest region of the display accessible to an app in the current system state, without subtracting any window decor or applying scaling factors. |
GetRealSize(Point) |
Gets the size of the largest region of the display accessible to an app in the current system state, without subtracting any window decor or applying scaling factors. |
GetRectSize(Rect) |
Gets the size of the display as a rectangle, in pixels. |
GetRoundedCorner(Int32) |
Returns the |
GetSize(Point) |
Gets the size of the display in pixels. |
GetSupportedModes() |
Gets the supported modes of this display. |
GetSupportedRefreshRates() |
Get the supported refresh rates of this display in frames per second. |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
RegisterHdrSdrRatioChangedListener(IExecutor, IConsumer) |
Registers a listener that will be invoked whenever the display's hdr/sdr ratio has changed. |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
UnregisterHdrSdrRatioChangedListener(IConsumer) | |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |