DimensionBuilders

public final class DimensionBuilders
extends Object

java.lang.Object
   ↳ androidx.wear.tiles.builders.DimensionBuilders


Builders for dimensions for layout elements.

Summary

Nested classes

interface DimensionBuilders.ContainerDimension

Interface defining a dimension that can be applied to a container. 

class DimensionBuilders.DegreesProp

A type for angular dimensions, measured in degrees. 

class DimensionBuilders.DpProp

A type for linear dimensions, measured in dp. 

class DimensionBuilders.EmProp

A type for font spacing, measured in em. 

class DimensionBuilders.ExpandedDimensionProp

A type for a dimension that fills all the space it can (i.e. 

interface DimensionBuilders.ImageDimension

Interface defining a dimension that can be applied to an image. 

class DimensionBuilders.ProportionalDimensionProp

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. 

class DimensionBuilders.SpProp

A type for font sizes, measured in sp. 

interface DimensionBuilders.SpacerDimension

Interface defining a dimension that can be applied to a spacer. 

class DimensionBuilders.WrappedDimensionProp

A type for a dimension that sizes itself to the size of its children (i.e. 

Public methods

static DimensionBuilders.DegreesProp degrees(float valueDegrees)

Shortcut for building an DimensionBuilders.DegreesProp using a measurement in degrees.

static DimensionBuilders.DpProp dp(float valueDp)

Shortcut for building a DimensionBuilders.DpProp using a measurement in DP.

static DimensionBuilders.EmProp em(int valueEm)

Shortcut for building a DimensionBuilders.EmProp using a measurement in EM.

static DimensionBuilders.ExpandedDimensionProp expand()

Shortcut for building an DimensionBuilders.ExpandedDimensionProp that will expand to the size of its parent.

static DimensionBuilders.SpProp sp(float valueSp)

Shortcut for building a DimensionBuilders.SpProp using a measurement in SP.

static DimensionBuilders.WrappedDimensionProp wrap()

Shortcut for building an DimensionBuilders.WrappedDimensionProp that will shrink to the size of its children.

Inherited methods

Public methods

degrees

public static DimensionBuilders.DegreesProp degrees (float valueDegrees)

Shortcut for building an DimensionBuilders.DegreesProp using a measurement in degrees.

Parameters
valueDegrees float

Returns
DimensionBuilders.DegreesProp

dp

public static DimensionBuilders.DpProp dp (float valueDp)

Shortcut for building a DimensionBuilders.DpProp using a measurement in DP.

Parameters
valueDp float

Returns
DimensionBuilders.DpProp

em

public static DimensionBuilders.EmProp em (int valueEm)

Shortcut for building a DimensionBuilders.EmProp using a measurement in EM.

Parameters
valueEm int

Returns
DimensionBuilders.EmProp

expand

public static DimensionBuilders.ExpandedDimensionProp expand ()

Shortcut for building an DimensionBuilders.ExpandedDimensionProp that will expand to the size of its parent.

Returns
DimensionBuilders.ExpandedDimensionProp

sp

public static DimensionBuilders.SpProp sp (float valueSp)

Shortcut for building a DimensionBuilders.SpProp using a measurement in SP.

Parameters
valueSp float

Returns
DimensionBuilders.SpProp

wrap

public static DimensionBuilders.WrappedDimensionProp wrap ()

Shortcut for building an DimensionBuilders.WrappedDimensionProp that will shrink to the size of its children.

Returns
DimensionBuilders.WrappedDimensionProp