public final class

DeviceParametersProto.DeviceParameters

extends <any>

implements DeviceParametersProto.DeviceParametersOrBuilder

 java.lang.Object

↳<any>

↳androidx.wear.protolayout.proto.DeviceParametersProto.DeviceParameters

Overview

 Parameters describing the device requesting a layout update. This contains
 physical and logical characteristics about the device (e.g. screen size and
 density, etc).
 
Protobuf type androidx.wear.protolayout.proto.DeviceParameters

Summary

Fields
public static final intCAPABILITIES_FIELD_NUMBER

public static final intDEVICE_PLATFORM_FIELD_NUMBER

public static final intFONT_SCALE_FIELD_NUMBER

public static final intRENDERER_SCHEMA_VERSION_FIELD_NUMBER

public static final intSCREEN_DENSITY_FIELD_NUMBER

public static final intSCREEN_HEIGHT_DP_FIELD_NUMBER

public static final intSCREEN_SHAPE_FIELD_NUMBER

public static final intSCREEN_WIDTH_DP_FIELD_NUMBER

Methods
protected final java.lang.ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)

public DeviceParametersProto.CapabilitiesgetCapabilities()

 Renderer supported Capabilities

public static DeviceParametersProto.DeviceParametersgetDefaultInstance()

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.

public static DeviceParametersProto.DeviceParameters.BuildernewBuilder()

public static DeviceParametersProto.DeviceParameters.BuildernewBuilder(DeviceParametersProto.DeviceParameters prototype)

public static DeviceParametersProto.DeviceParametersparseDelimitedFrom(java.io.InputStream input)

public static DeviceParametersProto.DeviceParametersparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParametersparseFrom(byte[] data[], com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParametersparseFrom(java.nio.ByteBuffer data)

public static DeviceParametersProto.DeviceParametersparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParametersparseFrom(com.google.protobuf.ByteString data)

public static DeviceParametersProto.DeviceParametersparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParametersparseFrom(com.google.protobuf.CodedInputStream input)

public static DeviceParametersProto.DeviceParametersparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParametersparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static <any>parser()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final int SCREEN_WIDTH_DP_FIELD_NUMBER

public static final int SCREEN_HEIGHT_DP_FIELD_NUMBER

public static final int SCREEN_DENSITY_FIELD_NUMBER

public static final int FONT_SCALE_FIELD_NUMBER

public static final int DEVICE_PLATFORM_FIELD_NUMBER

public static final int SCREEN_SHAPE_FIELD_NUMBER

public static final int RENDERER_SCHEMA_VERSION_FIELD_NUMBER

public static final int CAPABILITIES_FIELD_NUMBER

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;

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;

public boolean hasCapabilities()

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

public DeviceParametersProto.Capabilities getCapabilities()

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

public static DeviceParametersProto.DeviceParameters parseFrom(java.nio.ByteBuffer data)

public static DeviceParametersProto.DeviceParameters parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParameters parseFrom(com.google.protobuf.ByteString data)

public static DeviceParametersProto.DeviceParameters parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParameters parseFrom(byte[] data[], com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParameters parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParameters parseDelimitedFrom(java.io.InputStream input)

public static DeviceParametersProto.DeviceParameters parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

public static DeviceParametersProto.DeviceParameters parseFrom(com.google.protobuf.CodedInputStream input)

public static DeviceParametersProto.DeviceParameters parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)

protected final java.lang.Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)

public static DeviceParametersProto.DeviceParameters getDefaultInstance()

public static <any> parser()