public final class

DimensionBuilders.ProportionalDimensionProp

extends java.lang.Object

implements DimensionBuilders.ImageDimension

 java.lang.Object

↳androidx.wear.tiles.builders.DimensionBuilders.ProportionalDimensionProp

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).

Summary

Methods
public static DimensionBuilders.ProportionalDimensionProp.Builderbuilder()

Returns a new DimensionBuilders.ProportionalDimensionProp.Builder.

public static DimensionBuilders.ProportionalDimensionPropfromProto(DimensionProto.ProportionalDimensionProp proto)

public DimensionProto.ImageDimensiontoImageDimensionProto()

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

Methods

Returns a new DimensionBuilders.ProportionalDimensionProp.Builder.

public static DimensionBuilders.ProportionalDimensionProp fromProto(DimensionProto.ProportionalDimensionProp proto)

public DimensionProto.ImageDimension toImageDimensionProto()