LayoutElementBuilders.ArcLine.Builder


public final class LayoutElementBuilders.ArcLine.Builder


Builder for ArcLine.

Summary

Public constructors

Creates an instance of Builder.

Public methods

@NonNull LayoutElementBuilders.ArcLine

Builds an instance with values accumulated in this Builder.

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

Sets the direction in which this line is drawn.

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

Sets the direction in which this line is drawn.

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

Sets a brush used to draw this line.

@NonNull LayoutElementBuilders.ArcLine.Builder

Sets the color of this line.

@NonNull LayoutElementBuilders.ArcLine.Builder

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

@NonNull LayoutElementBuilders.ArcLine.Builder

Sets the length of this line, in degrees.

@NonNull LayoutElementBuilders.ArcLine.Builder

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

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

Sets the line stroke cap.

@NonNull LayoutElementBuilders.ArcLine.Builder

Sets the line stroke cap.

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

Sets the thickness of this line.

Public constructors

Builder

Added in 1.0.0
public Builder()

Creates an instance of Builder.

Public methods

build

Added in 1.0.0
public @NonNull LayoutElementBuilders.ArcLine build()

Builds an instance with values accumulated in this Builder.

setArcDirection

Added in 1.2.0-alpha01
@RequiresSchemaVersion(major = 1, minor = 300)
public @NonNull LayoutElementBuilders.ArcLine.Builder setArcDirection(int arcDirection)

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)
public @NonNull LayoutElementBuilders.ArcLine.Builder setArcDirection(
    @NonNull LayoutElementBuilders.ArcDirectionProp arcDirection
)

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)
public @NonNull LayoutElementBuilders.ArcLine.Builder setBrush(@NonNull ColorBuilders.Brush brush)

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)
public @NonNull LayoutElementBuilders.ArcLine.Builder setColor(@NonNull ColorBuilders.ColorProp color)

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)
public @NonNull LayoutElementBuilders.ArcLine.Builder setLayoutConstraintsForDynamicLength(
    @NonNull DimensionBuilders.AngularLayoutConstraint angularLayoutConstraint
)

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)
public @NonNull LayoutElementBuilders.ArcLine.Builder setLength(@NonNull DimensionBuilders.DegreesProp length)

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)
public @NonNull LayoutElementBuilders.ArcLine.Builder setStrokeCap(int strokeCap)

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

setStrokeCap

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

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

setThickness

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

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

Note that this field only supports static values.