DeviceParametersReaders.DeviceParameters

public static class DeviceParametersReaders.DeviceParameters
extends Object

java.lang.Object
   ↳ androidx.wear.tiles.readers.DeviceParametersReaders.DeviceParameters


Reader for the Device Parameters returned from RequestReaders.TileRequest.getDeviceParameters().

Summary

Public methods

int getDevicePlatform()

Get the platform of the device.

float getScreenDensity()

Get the density of the screen.

int getScreenHeightDp()

Get the height of the screen, in DP.

int getScreenShape()

Get the shape of the screen of the device.

int getScreenWidthDp()

Get the width of the screen, in DP.

Inherited methods

Public methods

getDevicePlatform

public int getDevicePlatform ()

Get the platform of the device.

Returns
int

getScreenDensity

public float getScreenDensity ()

Get the density of the screen. This value is the scaling factor to get from DP to Pixels, where PX = DP * density.

Returns
float

Value is 0.0 or greater.

getScreenHeightDp

public int getScreenHeightDp ()

Get the height of the screen, in DP.

Returns
int

getScreenShape

public int getScreenShape ()

Get the shape of the screen of the device.

Returns
int

getScreenWidthDp

public int getScreenWidthDp ()

Get the width of the screen, in DP.

Returns
int