LayoutElementBuilders.Arc.Builder


class LayoutElementBuilders.Arc.Builder


Builder for Arc.

Summary

Public constructors

Creates an instance of Builder.

Public functions

LayoutElementBuilders.Arc.Builder

Adds one item to contents of this container.

LayoutElementBuilders.Arc

Builds an instance from accumulated values.

LayoutElementBuilders.Arc.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setAnchorAngle(anchorAngle: DimensionBuilders.DegreesProp)

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

LayoutElementBuilders.Arc.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setAnchorType(anchorType: Int)

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

LayoutElementBuilders.Arc.Builder

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

LayoutElementBuilders.Arc.Builder
@RequiresSchemaVersion(major = 1, minor = 300)
setArcDirection(arcDirection: Int)

Sets the direction in which child elements are laid out.

LayoutElementBuilders.Arc.Builder

Sets the direction in which child elements are laid out.

LayoutElementBuilders.Arc.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setModifiers(modifiers: ModifiersBuilders.Modifiers)

Sets androidx.wear.protolayout.ModifiersBuilders.Modifiers for this element.

LayoutElementBuilders.Arc.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setVerticalAlign(verticalAlign: Int)

Sets vertical alignment of elements within the arc.

LayoutElementBuilders.Arc.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setVerticalAlign(
    verticalAlign: LayoutElementBuilders.VerticalAlignmentProp
)

Sets vertical alignment of elements within the arc.

Public constructors

Builder

Added in 1.0.0
Builder()

Creates an instance of Builder.

Public functions

addContent

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun addContent(content: LayoutElementBuilders.ArcLayoutElement): LayoutElementBuilders.Arc.Builder

Adds one item to contents of this container.

build

Added in 1.0.0
fun build(): LayoutElementBuilders.Arc

Builds an instance from accumulated values.

setAnchorAngle

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setAnchorAngle(anchorAngle: DimensionBuilders.DegreesProp): LayoutElementBuilders.Arc.Builder

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.

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).

setAnchorType

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setAnchorType(anchorType: Int): LayoutElementBuilders.Arc.Builder

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

setAnchorType

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setAnchorType(anchorType: LayoutElementBuilders.ArcAnchorTypeProp): LayoutElementBuilders.Arc.Builder

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

setArcDirection

Added in 1.2.0
@RequiresSchemaVersion(major = 1, minor = 300)
fun setArcDirection(arcDirection: Int): LayoutElementBuilders.Arc.Builder

Sets the direction in which child elements are laid out. If not set, defaults to ARC_DIRECTION_NORMAL.

setArcDirection

Added in 1.2.0
@RequiresSchemaVersion(major = 1, minor = 300)
fun setArcDirection(arcDirection: LayoutElementBuilders.ArcDirectionProp): LayoutElementBuilders.Arc.Builder

Sets the direction in which child elements are laid out. If not set, defaults to ARC_DIRECTION_NORMAL.

setVerticalAlign

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setVerticalAlign(verticalAlign: Int): LayoutElementBuilders.Arc.Builder

Sets vertical alignment of elements within the arc. If the 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 VERTICAL_ALIGN_CENTER.

setVerticalAlign

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setVerticalAlign(
    verticalAlign: LayoutElementBuilders.VerticalAlignmentProp
): LayoutElementBuilders.Arc.Builder

Sets vertical alignment of elements within the arc. If the 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 VERTICAL_ALIGN_CENTER.