LayoutElementBuilders.Spacer

public final class LayoutElementBuilders.Spacer implements LayoutElementBuilders.LayoutElement


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

Summary

Nested types

LayoutElementBuilders.Spacer.Builder

Builder for Spacer.

Public methods

getHeight

@Nullable
@NonNull
public DimensionBuilders.SpacerDimension getHeight()

Gets the height of this spacer. If not defined, defaults to 0. Intended for testing purposes only.

getModifiers

@Nullable
@NonNull
public ModifiersBuilders.Modifiers getModifiers()

Gets androidx.wear.tiles.ModifiersBuilders.Modifiers for this element. Intended for testing purposes only.

getWidth

@Nullable
@NonNull
public DimensionBuilders.SpacerDimension getWidth()

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