public final class

DisplayCompat.ModeCompat

extends java.lang.Object

 java.lang.Object

↳androidx.core.view.DisplayCompat.ModeCompat

Overview

Compat class which provides access to the underlying display mode, if there is one, and a more reliable display mode size.

Summary

Methods
public intgetPhysicalHeight()

Returns the physical height of the given display when configured in this mode.

public intgetPhysicalWidth()

Returns the physical width of the given display when configured in this mode.

public booleanisNative()

This field indicates whether a mode has the same resolution as the current display mode.

public Display.ModetoMode()

Returns the wrapped object Display.Mode, which may be null if no mode is available.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public int getPhysicalWidth()

Returns the physical width of the given display when configured in this mode.

public int getPhysicalHeight()

Returns the physical height of the given display when configured in this mode.

public boolean isNative()

Deprecated: Use DisplayCompat.getMode(Context, Display) to retrieve the resolution of the current display mode.

This field indicates whether a mode has the same resolution as the current display mode.

This field does *not* indicate the native resolution of the display.

Returns:

true if this mode is the same resolution as the current display mode.

public Display.Mode toMode()

Returns the wrapped object Display.Mode, which may be null if no mode is available.