CreationDisplayInfo
-
android
class CreationDisplayInfo
Holds information about the display properties at the time of creation.
This includes the width, height, and density of the display where the remote UI will be rendered. These properties may differ from the properties of the local UI context and may change when the document is played.
Summary
Public constructors |
|
|---|---|
CreationDisplayInfo(width: Int, height: Int, mDensityDpi: Int) |
android
|
Public functions |
||
|---|---|---|
Float |
Returns the logical density of the display. |
android
|
Int |
Returns the density in DPI. |
android
|
Int |
Returns the height in pixels of the virtual display. |
android
|
Int |
getWidth()Returns the width in pixels of the virtual display. |
android
|
Public constructors
Public functions
getDensity
fun getDensity(): Float
Returns the logical density of the display. This is a scaling factor for the Density Independent Pixel unit, where one DIP is one pixel on an approximately 160 dpi screen (for example a 240x320, 1.5"x2" screen), providing the baseline of the system's display. Thus on a 160dpi screen this density value will be 1; on a 120 dpi screen it would be .75; etc.
| See also | |
|---|---|
getDensityDpi |
getDensityDpi
fun getDensityDpi(): Int
Returns the density in DPI. The calculation is based on a baseline of 160 DPI for a density of 1.0.