LayoutElementBuilders.ArcLine.Builder
class LayoutElementBuilders.ArcLine.Builder
Builder for ArcLine
.
Summary
Public functions
build
fun build(): LayoutElementBuilders.ArcLine
Builds an instance with values accumulated in this Builder.
setArcDirection
@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
@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
@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
@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
@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
@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.
setModifiers
@RequiresSchemaVersion(major = 1, minor = 0)
fun setModifiers(modifiers: ModifiersBuilders.ArcModifiers): LayoutElementBuilders.ArcLine.Builder
Sets androidx.wear.protolayout.ModifiersBuilders.Modifiers
for this element.
setStrokeCap
@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
@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
@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.