public final class

DimensionProto.ProportionalDimensionProp.Builder

extends <any>

implements DimensionProto.ProportionalDimensionPropOrBuilder

 java.lang.Object

↳<any>

↳androidx.wear.protolayout.proto.DimensionProto.ProportionalDimensionProp.Builder

Overview

 A type for a dimension that scales itself proportionally to another dimension
 such that the aspect ratio defined by the given width and height values is
 preserved.

 Note that the width and height are unitless; only their ratio is relevant.
 This allows for specifying an element's size using common ratios (e.g.
 width=4, height=3), or to allow an element to be resized proportionally based
 on the size of an underlying asset (e.g. an 800x600 image being added to a
 smaller container and resized accordingly).
 
Protobuf type androidx.wear.protolayout.proto.ProportionalDimensionProp

Summary

Methods
public DimensionProto.ProportionalDimensionProp.BuilderclearAspectRatioHeight()

 The height to be used when calculating the aspect ratio ratio to preserve.

public DimensionProto.ProportionalDimensionProp.BuilderclearAspectRatioWidth()

 The width to be used when calculating the aspect ratio to preserve.

public intgetAspectRatioHeight()

 The height to be used when calculating the aspect ratio ratio to preserve.

public intgetAspectRatioWidth()

 The width to be used when calculating the aspect ratio to preserve.

public DimensionProto.ProportionalDimensionProp.BuildersetAspectRatioHeight(int value)

 The height to be used when calculating the aspect ratio ratio to preserve.

public DimensionProto.ProportionalDimensionProp.BuildersetAspectRatioWidth(int value)

 The width to be used when calculating the aspect ratio to preserve.

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

Methods

public int getAspectRatioWidth()

 The width to be used when calculating the aspect ratio to preserve.
 
uint32 aspect_ratio_width = 1;

Returns:

The aspectRatioWidth.

public DimensionProto.ProportionalDimensionProp.Builder setAspectRatioWidth(int value)

 The width to be used when calculating the aspect ratio to preserve.
 
uint32 aspect_ratio_width = 1;

Parameters:

value: The aspectRatioWidth to set.

Returns:

This builder for chaining.

 The width to be used when calculating the aspect ratio to preserve.
 
uint32 aspect_ratio_width = 1;

Returns:

This builder for chaining.

public int getAspectRatioHeight()

 The height to be used when calculating the aspect ratio ratio to preserve.
 
uint32 aspect_ratio_height = 2;

Returns:

The aspectRatioHeight.

public DimensionProto.ProportionalDimensionProp.Builder setAspectRatioHeight(int value)

 The height to be used when calculating the aspect ratio ratio to preserve.
 
uint32 aspect_ratio_height = 2;

Parameters:

value: The aspectRatioHeight to set.

Returns:

This builder for chaining.

public DimensionProto.ProportionalDimensionProp.Builder clearAspectRatioHeight()

 The height to be used when calculating the aspect ratio ratio to preserve.
 
uint32 aspect_ratio_height = 2;

Returns:

This builder for chaining.