DeviceParametersBuilders.DeviceParameters.Builder

Added in 1.0.0
Deprecated in 1.2.0

class DeviceParametersBuilders.DeviceParameters.Builder


Builder for DeviceParameters

Summary

Public constructors

Public functions

DeviceParametersBuilders.DeviceParameters

Builds an instance from accumulated values.

DeviceParametersBuilders.DeviceParameters.Builder
setDevicePlatform(devicePlatform: Int)

Sets the platform of the device.

DeviceParametersBuilders.DeviceParameters.Builder
setScreenDensity(
    screenDensity: @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) Float
)

Sets density of the display.

DeviceParametersBuilders.DeviceParameters.Builder
setScreenHeightDp(screenHeightDp: @Dimension(unit = 0) Int)

Sets height of the device's screen in DP.

DeviceParametersBuilders.DeviceParameters.Builder
setScreenShape(screenShape: Int)

Sets the shape of the device's screen.

DeviceParametersBuilders.DeviceParameters.Builder
setScreenWidthDp(screenWidthDp: @Dimension(unit = 0) Int)

Sets width of the device's screen in DP.

Public constructors

Builder

Added in 1.0.0
Deprecated in 1.2.0
Builder()

Public functions

build

Added in 1.0.0
Deprecated in 1.2.0
fun build(): DeviceParametersBuilders.DeviceParameters

Builds an instance from accumulated values.

setDevicePlatform

Added in 1.0.0
Deprecated in 1.2.0
fun setDevicePlatform(devicePlatform: Int): DeviceParametersBuilders.DeviceParameters.Builder

Sets the platform of the device.

setScreenDensity

Added in 1.0.0
Deprecated in 1.2.0
fun setScreenDensity(
    screenDensity: @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) Float
): DeviceParametersBuilders.DeviceParameters.Builder

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

setScreenHeightDp

Added in 1.0.0
Deprecated in 1.2.0
fun setScreenHeightDp(screenHeightDp: @Dimension(unit = 0) Int): DeviceParametersBuilders.DeviceParameters.Builder

Sets height of the device's screen in DP.

setScreenShape

Added in 1.0.0
Deprecated in 1.2.0
fun setScreenShape(screenShape: Int): DeviceParametersBuilders.DeviceParameters.Builder

Sets the shape of the device's screen.

setScreenWidthDp

Added in 1.0.0
Deprecated in 1.2.0
fun setScreenWidthDp(screenWidthDp: @Dimension(unit = 0) Int): DeviceParametersBuilders.DeviceParameters.Builder

Sets width of the device's screen in DP.