# LinearProgressIndicatorSpec

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/progressindicator/LinearProgressIndicatorSpec.java)

*** ** * ** ***


```
public final class LinearProgressIndicatorSpec extends BaseProgressIndicatorSpec
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [com.google.android.material.progressindicator.BaseProgressIndicatorSpec](https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec) ||
|   | ↳ | [com.google.android.material.progressindicator.LinearProgressIndicatorSpec](https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec) |

*** ** * ** ***

This class contains the parameters for drawing a linear type progress indicator. The parameters reflect the attributes defined in `R.styleable.BaseProgressIndicator` and `
R.styleable.LinearProgressIndicator`.

## Summary

| ### Public fields |
|---|---|
| `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#hasInnerCornerRadius()` |
| `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#indeterminateAnimationType()` The type of animation of indeterminate mode. |
| `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#indicatorDirection()` The direction in which the indicator will swipe or grow to. |
| `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#trackInnerCornerRadius()` |
| `float` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#trackInnerCornerRadiusFraction()` |
| `https://developer.android.com/reference/java/lang/Integer` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#trackStopIndicatorPadding()` The padding of the stop indicator at the end of the track. |
| `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#trackStopIndicatorSize()` The desired size of the stop indicator at the end of the track. |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#useRelativeTrackInnerCornerRadius()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#LinearProgressIndicatorSpec(Context,AttributeSet)(Context context, AttributeSet attrs)` Instantiates the spec for `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicator`. |
| `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#LinearProgressIndicatorSpec(Context,AttributeSet,int)( Context context, AttributeSet attrs, int defStyleAttr )` |
| `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#LinearProgressIndicatorSpec(Context,AttributeSet,int,int)( Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes )` |

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#getTrackInnerCornerRadiusInPx()()` |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicatorSpec#useStrokeCap()()` Returns true if the stroke ROUND cap should be used to prevent artifacts like (b/319309456), when fully rounded corners are specified. |

| ### Inherited fields |
|---|
| From [com.google.android.material.progressindicator.BaseProgressIndicatorSpec](https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec) |---|---| | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#hideAnimationBehavior()` The animation behavior to hide the indicator and track. | | `float` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#indeterminateAnimatorDurationScale()` The scale of the animation duration in indeterminate mode. | | `int[]` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#indicatorColors()` The color array used in the indicator. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#indicatorTrackGapSize()` The size of the gap between the indicator and the rest of the track. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#showAnimationBehavior()` The animation behavior to show the indicator and track. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#trackColor()` The color used in the track. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#trackCornerRadius()` When this is greater than 0, the corners of both the track and the indicator will be rounded with this radius. | | `float` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#trackCornerRadiusFraction()` The fraction of the track thickness to be used as the corner radius. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#trackThickness()` The thickness of the track and indicator. | | `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#useRelativeTrackCornerRadius()` When this is true, the {#link trackCornerRadiusFraction} takes effect. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#waveAmplitude()` The size of the amplitude, if a wave effect is configured. | | `float` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#waveAmplitudeRampProgressMax()` The normalized progress, at which the full wave amplitude will be ramped down. | | `float` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#waveAmplitudeRampProgressMin()` The normalized progress, at which the full wave amplitude will be ramped up. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#waveSpeed()` The speed of the waveform, if a wave effect is configured. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#wavelengthDeterminate()` The size of the wavelength in determinate mode, if a wave effect is configured. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#wavelengthIndeterminate()` The size of the wavelength in indeterminate mode, if a wave effect is configured. | |

| ### Inherited methods |
|---|
| From [com.google.android.material.progressindicator.BaseProgressIndicatorSpec](https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec) |---|---| | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#getTrackCornerRadiusInPx()()` Returns the track corner radius in pixels. | | `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#hasWavyEffect(boolean)(boolean isDeterminate)` | | `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#isHideAnimationEnabled()()` | | `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#isShowAnimationEnabled()()` | |

## Public fields

### hasInnerCornerRadius

```
public boolean hasInnerCornerRadius
```

### indeterminateAnimationType

```
public int indeterminateAnimationType
```

The type of animation of indeterminate mode.

### indicatorDirection

```
public int indicatorDirection
```

The direction in which the indicator will swipe or grow to.

### trackInnerCornerRadius

```
public int trackInnerCornerRadius
```

### trackInnerCornerRadiusFraction

```
public float trackInnerCornerRadiusFraction
```

### trackStopIndicatorPadding

```
public Integer trackStopIndicatorPadding
```

The padding of the stop indicator at the end of the track.

### trackStopIndicatorSize

```
public int trackStopIndicatorSize
```

The desired size of the stop indicator at the end of the track.

### useRelativeTrackInnerCornerRadius

```
public boolean useRelativeTrackInnerCornerRadius
```

## Public constructors

### LinearProgressIndicatorSpec

```
public LinearProgressIndicatorSpec(Context context, AttributeSet attrs)
```

Instantiates the spec for `https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicator`.

If attributes in `R.styleable.LinearProgressIndicator` are missing, the values in the default style `Widget.MaterialComponents.LinearProgressIndicator` will be loaded. If attributes in `R.styleable.BaseProgressIndicator` are missing, the values in the default style `Widget.MaterialComponents.ProgressIndicator` will be loaded.

| Parameters |
|---|---|
| `Context context` | Current themed context. |
| `AttributeSet attrs` | Component's attributes set. |

### LinearProgressIndicatorSpec

```
public LinearProgressIndicatorSpec(
    Context context,
    AttributeSet attrs,
    int defStyleAttr
)
```

### LinearProgressIndicatorSpec

```
public LinearProgressIndicatorSpec(
    Context context,
    AttributeSet attrs,
    int defStyleAttr,
    int defStyleRes
)
```

## Public methods

### getTrackInnerCornerRadiusInPx

```
public int getTrackInnerCornerRadiusInPx()
```

### useStrokeCap

```
public boolean useStrokeCap()
```

Returns true if the stroke ROUND cap should be used to prevent artifacts like (b/319309456), when fully rounded corners are specified.