DeviceParametersBuilders.DeviceParameters.Builder

Added in 1.0.0
Deprecated in 1.2.0

public final class DeviceParametersBuilders.DeviceParameters.Builder


Builder for DeviceParameters

Summary

Public constructors

Public methods

@NonNull DeviceParametersBuilders.DeviceParameters

Builds an instance from accumulated values.

@NonNull DeviceParametersBuilders.DeviceParameters.Builder
setDevicePlatform(int devicePlatform)

Sets the platform of the device.

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

Sets density of the display.

@NonNull DeviceParametersBuilders.DeviceParameters.Builder
setScreenHeightDp(@Dimension(unit = 0) int screenHeightDp)

Sets height of the device's screen in DP.

@NonNull DeviceParametersBuilders.DeviceParameters.Builder
setScreenShape(int screenShape)

Sets the shape of the device's screen.

@NonNull DeviceParametersBuilders.DeviceParameters.Builder
setScreenWidthDp(@Dimension(unit = 0) int screenWidthDp)

Sets width of the device's screen in DP.

Public constructors

Builder

Added in 1.0.0
Deprecated in 1.2.0
public Builder()

Public methods

build

Added in 1.0.0
Deprecated in 1.2.0
public @NonNull DeviceParametersBuilders.DeviceParameters build()

Builds an instance from accumulated values.

setDevicePlatform

Added in 1.0.0
Deprecated in 1.2.0
public @NonNull DeviceParametersBuilders.DeviceParameters.Builder setDevicePlatform(int devicePlatform)

Sets the platform of the device.

setScreenDensity

Added in 1.0.0
Deprecated in 1.2.0
public @NonNull DeviceParametersBuilders.DeviceParameters.Builder setScreenDensity(
    @FloatRange(from = 0.0, fromInclusive = false, toInclusive = false) float screenDensity
)

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
public @NonNull DeviceParametersBuilders.DeviceParameters.Builder setScreenHeightDp(@Dimension(unit = 0) int screenHeightDp)

Sets height of the device's screen in DP.

setScreenShape

Added in 1.0.0
Deprecated in 1.2.0
public @NonNull DeviceParametersBuilders.DeviceParameters.Builder setScreenShape(int screenShape)

Sets the shape of the device's screen.

setScreenWidthDp

Added in 1.0.0
Deprecated in 1.2.0
public @NonNull DeviceParametersBuilders.DeviceParameters.Builder setScreenWidthDp(@Dimension(unit = 0) int screenWidthDp)

Sets width of the device's screen in DP.