ModeCompat
class ModeCompat
kotlin.Any | |
↳ | androidx.core.view.DisplayCompat.ModeCompat |
Compat class which provides an additional isNative() field. This field indicates whether a mode is native, which is important when searching for the highest possible native resolution of a display.
Summary
Public methods | |
---|---|
Int |
Returns the physical height of the given display when configured in this mode |
Int |
Returns the physical width of the given display when configured in this mode |
Boolean |
isNative() This field indicates whether a mode is native, which is important when searching for the highest possible native resolution of a display. |
Mode? |
toMode() Function to get the wrapped object |
Public methods
getPhysicalHeight
fun getPhysicalHeight(): Int
Returns the physical height of the given display when configured in this mode
Return | |
---|---|
Int |
the physical screen height in pixels |
getPhysicalWidth
fun getPhysicalWidth(): Int
Returns the physical width of the given display when configured in this mode
Return | |
---|---|
Int |
the physical screen width in pixels |
isNative
fun isNative(): Boolean
This field indicates whether a mode is native, which is important when searching for the highest possible native resolution of a display.
Return | |
---|---|
Boolean |
true if this is a native mode of the wrapped display |