# LayoutElementBuilders.ArcLine.Builder

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/LayoutElementBuilders.java+class:androidx.wear.protolayout.LayoutElementBuilders.ArcLine.Builder) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public final class LayoutElementBuilders.ArcLine.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#Builder()()` Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder`. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine` | `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#build()()` Builds an instance with values accumulated in this Builder. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setArcDirection(int)(int arcDirection)` Sets the direction in which this line is drawn. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setArcDirection(androidx.wear.protolayout.LayoutElementBuilders.ArcDirectionProp)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcDirectionProp arcDirection )` Sets the direction in which this line is drawn. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setBrush(androidx.wear.protolayout.ColorBuilders.Brush)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.Brush brush)` Sets a brush used to draw this line. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setColor(androidx.wear.protolayout.ColorBuilders.ColorProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp color)` Sets the color of this line. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setLayoutConstraintsForDynamicLength(androidx.wear.protolayout.DimensionBuilders.AngularLayoutConstraint)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.AngularLayoutConstraint angularLayoutConstraint )` Sets the bounding constraints for the layout affected by the dynamic value from `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setLength(androidx.wear.protolayout.DimensionBuilders.DegreesProp)`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setLength(androidx.wear.protolayout.DimensionBuilders.DegreesProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DegreesProp length)` Sets the length of this line, in degrees. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setModifiers(androidx.wear.protolayout.ModifiersBuilders.ArcModifiers)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.ArcModifiers modifiers)` Sets `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` for this element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setStrokeCap(int)(int strokeCap)` Sets the line stroke cap. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setStrokeCap(androidx.wear.protolayout.LayoutElementBuilders.StrokeCapProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.StrokeCapProp strokeCap)` Sets the line stroke cap. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setThickness(androidx.wear.protolayout.DimensionBuilders.DpProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DpProp thickness)` Sets the thickness of this line. |

## Public constructors

### Builder

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public Builder()
```

Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder`.

## Public methods

### build

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @NonNull LayoutElementBuilders.ArcLine build()
```

Builds an instance with values accumulated in this Builder.

### setArcDirection

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

```
@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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

```
@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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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()`.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if the brush is not a `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.SweepGradient`. |

### setColor

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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 `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setLength(androidx.wear.protolayout.DimensionBuilders.DegreesProp)`.

### setLength

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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).

### setModifiers

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

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

Sets `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Modifiers` for this element.

### setStrokeCap

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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.