public final class

LayoutElementBuilders.Box

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement

 java.lang.Object

↳androidx.wear.protolayout.LayoutElementBuilders.Box

Overview

A container which stacks all of its children on top of one another. This also allows to add a background color, or to have a border around them with some padding.

Summary

Methods
public static LayoutElementBuilders.BoxfromProto(LayoutElementProto.Box proto, Fingerprint fingerprint)

Creates a new wrapper instance from the proto.

public java.util.List<LayoutElementBuilders.LayoutElement>getContents()

Gets the child element(s) to wrap.

public FingerprintgetFingerprint()

public DimensionBuilders.ContainerDimensiongetHeight()

Gets the height of this LayoutElementBuilders.Box.

public LayoutElementBuilders.HorizontalAlignmentPropgetHorizontalAlignment()

Gets the horizontal alignment of the element inside this LayoutElementBuilders.Box.

public ModifiersBuilders.ModifiersgetModifiers()

Gets ModifiersBuilders.Modifiers for this element.

public LayoutElementBuilders.VerticalAlignmentPropgetVerticalAlignment()

Gets the vertical alignment of the element inside this LayoutElementBuilders.Box.

public DimensionBuilders.ContainerDimensiongetWidth()

Gets the width of this LayoutElementBuilders.Box.

public LayoutElementProto.LayoutElementtoLayoutElementProto()

public java.lang.StringtoString()

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

Methods

public java.util.List<LayoutElementBuilders.LayoutElement> getContents()

Gets the child element(s) to wrap.

Gets the height of this LayoutElementBuilders.Box. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).

Gets the width of this LayoutElementBuilders.Box. If not defined, this will size itself to fit all of its children (i.e. a WrappedDimension).

public LayoutElementBuilders.HorizontalAlignmentProp getHorizontalAlignment()

Gets the horizontal alignment of the element inside this LayoutElementBuilders.Box. If not defined, defaults to HORIZONTAL_ALIGN_CENTER.

public LayoutElementBuilders.VerticalAlignmentProp getVerticalAlignment()

Gets the vertical alignment of the element inside this LayoutElementBuilders.Box. If not defined, defaults to VERTICAL_ALIGN_CENTER.

public ModifiersBuilders.Modifiers getModifiers()

Gets ModifiersBuilders.Modifiers for this element.

public Fingerprint getFingerprint()

public static LayoutElementBuilders.Box fromProto(LayoutElementProto.Box proto, Fingerprint fingerprint)

Creates a new wrapper instance from the proto.

public LayoutElementProto.LayoutElement toLayoutElementProto()

public java.lang.String toString()