public final class

LayoutElementBuilders.Spacer

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement

 java.lang.Object

↳androidx.wear.protolayout.LayoutElementBuilders.Spacer

Overview

A simple spacer, typically used to provide padding between adjacent elements.

Summary

Methods
public static LayoutElementBuilders.SpacerfromProto(LayoutElementProto.Spacer proto, Fingerprint fingerprint)

Creates a new wrapper instance from the proto.

public FingerprintgetFingerprint()

public DimensionBuilders.SpacerDimensiongetHeight()

Gets the height of this spacer.

public DimensionBuilders.VerticalLayoutConstraintgetLayoutConstraintsForDynamicHeight()

Gets the bounding constraints for the layout affected by the dynamic value from LayoutElementBuilders.Spacer.getHeight().

public DimensionBuilders.HorizontalLayoutConstraintgetLayoutConstraintsForDynamicWidth()

Gets the bounding constraints for the layout affected by the dynamic value from LayoutElementBuilders.Spacer.getWidth().

public ModifiersBuilders.ModifiersgetModifiers()

Gets ModifiersBuilders.Modifiers for this element.

public DimensionBuilders.SpacerDimensiongetWidth()

Gets the width of this LayoutElementBuilders.Spacer.

public LayoutElementProto.LayoutElementtoLayoutElementProto()

public java.lang.StringtoString()

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

Methods

Gets the width of this LayoutElementBuilders.Spacer. When this is added as the direct child of an LayoutElementBuilders.Arc, this must be specified as an angular dimension, otherwise a linear dimension must be used. If not defined, defaults to 0.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).

When using a dynamic value, make sure to specify the bounding constraints for the affected layout element through setLayoutConstraintsForDynamicWidth(HorizontalLayoutConstraint) otherwise build() fails.

Gets the height of this spacer. If not defined, defaults to 0.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).

When using a dynamic value, make sure to specify the bounding constraints for the affected layout element through setLayoutConstraintsForDynamicWidth(HorizontalLayoutConstraint) otherwise build() fails.

public ModifiersBuilders.Modifiers getModifiers()

Gets ModifiersBuilders.Modifiers for this element.

public DimensionBuilders.HorizontalLayoutConstraint getLayoutConstraintsForDynamicWidth()

Gets the bounding constraints for the layout affected by the dynamic value from LayoutElementBuilders.Spacer.getWidth().

public DimensionBuilders.VerticalLayoutConstraint getLayoutConstraintsForDynamicHeight()

Gets the bounding constraints for the layout affected by the dynamic value from LayoutElementBuilders.Spacer.getHeight().

public Fingerprint getFingerprint()

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

Creates a new wrapper instance from the proto.

public LayoutElementProto.LayoutElement toLayoutElementProto()

public java.lang.String toString()