LayoutElementBuilders.ArcLine.Builder


class LayoutElementBuilders.ArcLine.Builder


Builder for ArcLine.

Summary

Public constructors

Creates an instance of Builder.

Public functions

LayoutElementBuilders.ArcLine

Builds an instance with values accumulated in this Builder.

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

Sets the direction in which this line is drawn.

LayoutElementBuilders.ArcLine.Builder

Sets the direction in which this line is drawn.

LayoutElementBuilders.ArcLine.Builder
@RequiresSchemaVersion(major = 1, minor = 300)
setBrush(brush: ColorBuilders.Brush)

Sets a brush used to draw this line.

LayoutElementBuilders.ArcLine.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setColor(color: ColorBuilders.ColorProp)

Sets the color of this line.

LayoutElementBuilders.ArcLine.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setLayoutConstraintsForDynamicLength(
    angularLayoutConstraint: DimensionBuilders.AngularLayoutConstraint
)

Sets the bounding constraints for the layout affected by the dynamic value from setLength.

LayoutElementBuilders.ArcLine.Builder

Sets the length of this line, in degrees.

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

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

LayoutElementBuilders.ArcLine.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setStrokeCap(strokeCap: Int)

Sets the line stroke cap.

LayoutElementBuilders.ArcLine.Builder

Sets the line stroke cap.

LayoutElementBuilders.ArcLine.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setThickness(thickness: DimensionBuilders.DpProp)

Sets the thickness of this line.

Public constructors

Builder

Added in 1.0.0
Builder()

Creates an instance of Builder.

Public functions

build

Added in 1.0.0
fun build(): LayoutElementBuilders.ArcLine

Builds an instance with values accumulated in this Builder.

setArcDirection

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

Sets the direction in which this line is drawn. If not set, defaults to ARC_DIRECTION_CLOCKWISE.

setArcDirection

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

Sets the direction in which this line is drawn. If not set, defaults to ARC_DIRECTION_CLOCKWISE.

setBrush

Added in 1.1.0
@RequiresSchemaVersion(major = 1, minor = 300)
fun setBrush(brush: ColorBuilders.Brush): LayoutElementBuilders.ArcLine.Builder

Sets a brush used to draw this line. If set, the brush will be used instead of the color provided in setColor().

setColor

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setColor(color: ColorBuilders.ColorProp): LayoutElementBuilders.ArcLine.Builder

Sets the color of this line.

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

If a brush is set, this color will not be used.

setLayoutConstraintsForDynamicLength

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun setLayoutConstraintsForDynamicLength(
    angularLayoutConstraint: DimensionBuilders.AngularLayoutConstraint
): LayoutElementBuilders.ArcLine.Builder

Sets the bounding constraints for the layout affected by the dynamic value from setLength.

setLength

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setLength(length: DimensionBuilders.DegreesProp): LayoutElementBuilders.ArcLine.Builder

Sets the length of this line, in degrees. 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 setLayoutConstraintsForDynamicLength(AngularLayoutConstraint) otherwise build() fails.

setStrokeCap

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun setStrokeCap(strokeCap: Int): LayoutElementBuilders.ArcLine.Builder

Sets the line stroke cap. If not defined, defaults to STROKE_CAP_ROUND.

setStrokeCap

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun setStrokeCap(strokeCap: LayoutElementBuilders.StrokeCapProp): LayoutElementBuilders.ArcLine.Builder

Sets the line stroke cap. If not defined, defaults to STROKE_CAP_ROUND.

setThickness

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setThickness(thickness: DimensionBuilders.DpProp): LayoutElementBuilders.ArcLine.Builder

Sets the thickness of this line. If not defined, defaults to 0.

Note that this field only supports static values.