public interface

DeviceParametersProto.DeviceParametersOrBuilder

 androidx.wear.protolayout.proto.DeviceParametersProto.DeviceParametersOrBuilder

Subclasses:

DeviceParametersProto.DeviceParameters, DeviceParametersProto.DeviceParameters.Builder

Summary

Methods
public DeviceParametersProto.CapabilitiesgetCapabilities()

 Renderer supported Capabilities

public DeviceParametersProto.DevicePlatformgetDevicePlatform()

 The platform of the device.

public intgetDevicePlatformValue()

 The platform of the device.

public floatgetFontScale()

 Current user preference for the scaling factor for fonts displayed on the
 display.

public VersionProto.VersionInfogetRendererSchemaVersion()

 The maximum schema version supported by the current renderer.

public floatgetScreenDensity()

 Density of the display.

public intgetScreenHeightDp()

 Height of the device's screen in DP.

public DeviceParametersProto.ScreenShapegetScreenShape()

 The shape of the device's screen

public intgetScreenShapeValue()

 The shape of the device's screen

public intgetScreenWidthDp()

 Width of the device's screen in DP.

public booleanhasCapabilities()

 Renderer supported Capabilities

public booleanhasRendererSchemaVersion()

 The maximum schema version supported by the current renderer.

Methods

public int getScreenWidthDp()

 Width of the device's screen in DP.
 
uint32 screen_width_dp = 1;

Returns:

The screenWidthDp.

public int getScreenHeightDp()

 Height of the device's screen in DP.
 
uint32 screen_height_dp = 2;

Returns:

The screenHeightDp.

public float getScreenDensity()

 Density of the display. This value is the scaling factor to get from DP to
 Pixels (px = dp * density).
 
float screen_density = 3;

Returns:

The screenDensity.

public float getFontScale()

 Current user preference for the scaling factor for fonts displayed on the
 display. This value is used to get from SP to DP (dp = sp * font_scale).
 
float font_scale = 7;

Returns:

The fontScale.

public int getDevicePlatformValue()

 The platform of the device.
 
.androidx.wear.protolayout.proto.DevicePlatform device_platform = 4;

Returns:

The enum numeric value on the wire for devicePlatform.

public DeviceParametersProto.DevicePlatform getDevicePlatform()

 The platform of the device.
 
.androidx.wear.protolayout.proto.DevicePlatform device_platform = 4;

Returns:

The devicePlatform.

public int getScreenShapeValue()

 The shape of the device's screen
 
.androidx.wear.protolayout.proto.ScreenShape screen_shape = 5;

Returns:

The enum numeric value on the wire for screenShape.

public DeviceParametersProto.ScreenShape getScreenShape()

 The shape of the device's screen
 
.androidx.wear.protolayout.proto.ScreenShape screen_shape = 5;

Returns:

The screenShape.

public boolean hasRendererSchemaVersion()

 The maximum schema version supported by the current renderer. When building
 a layout that uses features not available on schema version 1.0 , this can
 be used to conditionally choose which feature to use.
 
.androidx.wear.protolayout.expression.proto.VersionInfo renderer_schema_version = 6;

Returns:

Whether the rendererSchemaVersion field is set.

public VersionProto.VersionInfo getRendererSchemaVersion()

 The maximum schema version supported by the current renderer. When building
 a layout that uses features not available on schema version 1.0 , this can
 be used to conditionally choose which feature to use.
 
.androidx.wear.protolayout.expression.proto.VersionInfo renderer_schema_version = 6;

Returns:

The rendererSchemaVersion.

public boolean hasCapabilities()

 Renderer supported Capabilities
 
.androidx.wear.protolayout.proto.Capabilities capabilities = 8;

Returns:

Whether the capabilities field is set.

public DeviceParametersProto.Capabilities getCapabilities()

 Renderer supported Capabilities
 
.androidx.wear.protolayout.proto.Capabilities capabilities = 8;

Returns:

The capabilities.