LayoutElementBuilders.Arc.Builder

public static final class LayoutElementBuilders.Arc.Builder
extends Object implements LayoutElementBuilders.LayoutElement.Builder

java.lang.Object
   ↳ androidx.wear.tiles.builders.LayoutElementBuilders.Arc.Builder


Builder for LayoutElementBuilders.Arc.

Summary

Public methods

LayoutElementBuilders.Arc.Builder addContent(LayoutElementBuilders.ArcLayoutElement.Builder contentBuilder)

Adds one item to contents of this container.

LayoutElementBuilders.Arc.Builder addContent(LayoutElementBuilders.ArcLayoutElement content)

Adds one item to contents of this container.

LayoutElementBuilders.Arc build()

Builds an instance with values accumulated in this Builder.

LayoutElementBuilders.Arc.Builder setAnchorAngle(DimensionBuilders.DegreesProp.Builder anchorAngleBuilder)

Sets the angle for the anchor, used with anchor_type to determine where to draw children.

LayoutElementBuilders.Arc.Builder setAnchorAngle(DimensionBuilders.DegreesProp anchorAngle)

Sets the angle for the anchor, used with anchor_type to determine where to draw children.

LayoutElementBuilders.Arc.Builder setAnchorType(int anchorType)

Sets how to align the contents of this container relative to anchor_angle.

LayoutElementBuilders.Arc.Builder setModifiers(ModifiersBuilders.Modifiers modifiers)

Sets ModifiersBuilders.Modifiers for this element.

LayoutElementBuilders.Arc.Builder setModifiers(ModifiersBuilders.Modifiers.Builder modifiersBuilder)

Sets ModifiersBuilders.Modifiers for this element.

LayoutElementBuilders.Arc.Builder setVerticalAlign(int verticalAlign)

Sets vertical alignment of elements within the arc.

Inherited methods

Public methods

addContent

public LayoutElementBuilders.Arc.Builder addContent (LayoutElementBuilders.ArcLayoutElement.Builder contentBuilder)

Adds one item to contents of this container.

Parameters
contentBuilder LayoutElementBuilders.ArcLayoutElement.Builder

Returns
LayoutElementBuilders.Arc.Builder

addContent

public LayoutElementBuilders.Arc.Builder addContent (LayoutElementBuilders.ArcLayoutElement content)

Adds one item to contents of this container.

Parameters
content LayoutElementBuilders.ArcLayoutElement

Returns
LayoutElementBuilders.Arc.Builder

build

public LayoutElementBuilders.Arc build ()

Builds an instance with values accumulated in this Builder.

Returns
LayoutElementBuilders.Arc

setAnchorAngle

public LayoutElementBuilders.Arc.Builder setAnchorAngle (DimensionBuilders.DegreesProp.Builder anchorAngleBuilder)

Sets the angle for the anchor, used with anchor_type to determine where to draw children. Note that 0 degrees is the 12 o clock position on a device, and the angle sweeps clockwise. If not defined, defaults to 0 degrees.

Values do not have to be clamped to the range 0-360; values less than 0 degrees will sweep anti-clockwise (i.e. -90 degrees is equivalent to 270 degrees), and values >360 will be be placed at X mod 360 degrees.

Parameters
anchorAngleBuilder DimensionBuilders.DegreesProp.Builder

Returns
LayoutElementBuilders.Arc.Builder

setAnchorAngle

public LayoutElementBuilders.Arc.Builder setAnchorAngle (DimensionBuilders.DegreesProp anchorAngle)

Sets the angle for the anchor, used with anchor_type to determine where to draw children. Note that 0 degrees is the 12 o clock position on a device, and the angle sweeps clockwise. If not defined, defaults to 0 degrees.

Values do not have to be clamped to the range 0-360; values less than 0 degrees will sweep anti-clockwise (i.e. -90 degrees is equivalent to 270 degrees), and values >360 will be be placed at X mod 360 degrees.

Parameters
anchorAngle DimensionBuilders.DegreesProp

Returns
LayoutElementBuilders.Arc.Builder

setAnchorType

public LayoutElementBuilders.Arc.Builder setAnchorType (int anchorType)

Sets how to align the contents of this container relative to anchor_angle. If not defined, defaults to ARC_ANCHOR_CENTER.

Parameters
anchorType int

Returns
LayoutElementBuilders.Arc.Builder

setModifiers

public LayoutElementBuilders.Arc.Builder setModifiers (ModifiersBuilders.Modifiers modifiers)

Sets ModifiersBuilders.Modifiers for this element.

Parameters
modifiers ModifiersBuilders.Modifiers

Returns
LayoutElementBuilders.Arc.Builder

setModifiers

public LayoutElementBuilders.Arc.Builder setModifiers (ModifiersBuilders.Modifiers.Builder modifiersBuilder)

Sets ModifiersBuilders.Modifiers for this element.

Parameters
modifiersBuilder ModifiersBuilders.Modifiers.Builder

Returns
LayoutElementBuilders.Arc.Builder

setVerticalAlign

public LayoutElementBuilders.Arc.Builder setVerticalAlign (int verticalAlign)

Sets vertical alignment of elements within the arc. If the LayoutElementBuilders.Arc's thickness is larger than the thickness of the element being drawn, this controls whether the element should be drawn towards the inner or outer edge of the arc, or drawn in the center. If not defined, defaults to VALIGN_CENTER.

Parameters
verticalAlign int

Returns
LayoutElementBuilders.Arc.Builder