DeviceParametersBuilders.DeviceParameters

public final class DeviceParametersBuilders.DeviceParameters


Parameters describing the device requesting a tile update. This contains physical and logical characteristics about the device (e.g. screen size and density, etc).

Summary

Public methods

@DeviceParametersBuilders.DevicePlatform @NonNull int

Gets the platform of the device.

@FloatRange(from = "0.0", fromInclusive = "false", toInclusive = "false") @NonNull float

Gets density of the display.

@Dimension(unit = "") @NonNull int

Gets height of the device's screen in DP.

@DeviceParametersBuilders.ScreenShape @NonNull int

Gets the shape of the device's screen.

@Dimension(unit = "") @NonNull int

Gets width of the device's screen in DP.

Public methods

getDevicePlatform

@DeviceParametersBuilders.DevicePlatform
@NonNull
public @DeviceParametersBuilders.DevicePlatform int getDevicePlatform()

Gets the platform of the device.

getScreenDensity

@FloatRange(from = "0.0", fromInclusive = "false", toInclusive = "false")
@NonNull
public @FloatRange(from = "0.0", fromInclusive = "false", toInclusive = "false") float getScreenDensity()

Gets density of the display. This value is the scaling factor to get from DP to Pixels (px = dp * density).

getScreenHeightDp

@Dimension(unit = "")
@NonNull
public @Dimension(unit = "") int getScreenHeightDp()

Gets height of the device's screen in DP.

getScreenShape

@DeviceParametersBuilders.ScreenShape
@NonNull
public @DeviceParametersBuilders.ScreenShape int getScreenShape()

Gets the shape of the device's screen.

getScreenWidthDp

@Dimension(unit = "")
@NonNull
public @Dimension(unit = "") int getScreenWidthDp()

Gets width of the device's screen in DP.