# ShapeAppearanceModel.Builder

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

*** ** * ** ***


```
public final class ShapeAppearanceModel.Builder
```

<br />

*** ** * ** ***

Builder to create instances of `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel`s.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#Builder()()` |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#Builder(com.google.android.material.shape.ShapeAppearanceModel)(https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel other)` |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#build()()` Builds an instance of a `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel` |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setAllCornerSizes(com.google.android.material.shape.CornerSize)(https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize)` Sets all corner sizes. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setAllCornerSizes(float)(float cornerSize)` Sets the corner size of all four corner treatments to `cornerSize`. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setAllCorners(com.google.android.material.shape.CornerTreatment)(https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment cornerTreatment)` Sets all corner treatments. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setAllCorners(int,float)(@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily, float cornerSize)` Sets all corner treatments to `https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment`s generated from a `cornerFamily` and `cornerSize`. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setAllEdges(com.google.android.material.shape.EdgeTreatment)(https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment edgeTreatment)` Sets all edge treatments. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomEdge(com.google.android.material.shape.EdgeTreatment)(https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment bottomEdge)` Sets the edge treatment for the bottom edge. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomLeftCorner(com.google.android.material.shape.CornerTreatment)(https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment bottomLeftCorner)` Sets the corner treatment for the bottom left corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomLeftCorner(int,com.google.android.material.shape.CornerSize)( @https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily, https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize )` Sets the corner treatment for the bottom left corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomLeftCorner(int,float)(@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily, float cornerSize)` Sets the corner treatment for the bottom left corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomLeftCornerSize(com.google.android.material.shape.CornerSize)(https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize)` Sets the bottom left corner size for the current corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomLeftCornerSize(float)(float cornerSize)` Sets the bottom left corner size for the current corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomRightCorner(com.google.android.material.shape.CornerTreatment)(https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment bottomRightCorner)` Sets the corner treatment for the bottom right corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomRightCorner(int,com.google.android.material.shape.CornerSize)( @https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily, https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize )` Sets the corner treatment for the bottom right corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomRightCorner(int,float)(@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily, float cornerSize)` Sets the corner treatment for the bottom right corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomRightCornerSize(com.google.android.material.shape.CornerSize)(https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize)` Sets the bottom right corner size for the current corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setBottomRightCornerSize(float)(float cornerSize)` Sets the bottom right corner size for the current corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setCornerSizeOverride(int,com.google.android.material.shape.CornerSize)(int cornerPositionSet, https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize)` |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setLeftEdge(com.google.android.material.shape.EdgeTreatment)(https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment leftEdge)` Sets the edge treatment for the left edge. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setRightEdge(com.google.android.material.shape.EdgeTreatment)(https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment rightEdge)` Sets the edge treatment for the right edge. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopEdge(com.google.android.material.shape.EdgeTreatment)(https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment topEdge)` Sets the edge treatment for the top edge. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopLeftCorner(com.google.android.material.shape.CornerTreatment)(https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment topLeftCorner)` Sets the corner treatment for the top left corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopLeftCorner(int,com.google.android.material.shape.CornerSize)(@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily, https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize)` Sets the corner treatment for the top left corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopLeftCorner(int,float)(@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily, float cornerSize)` Sets the corner treatment for the top left corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopLeftCornerSize(com.google.android.material.shape.CornerSize)(https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize)` Sets the top left corner size for the current corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopLeftCornerSize(float)(float cornerSize)` Sets the top left corner size for the current corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopRightCorner(com.google.android.material.shape.CornerTreatment)(https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment topRightCorner)` Sets the corner treatment for the top right corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopRightCorner(int,com.google.android.material.shape.CornerSize)(@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily, https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize)` Sets the corner treatment for the top right corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopRightCorner(int,float)(@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily, float cornerSize)` Sets the corner treatment for the top right corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopRightCornerSize(com.google.android.material.shape.CornerSize)(https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize)` Sets the top right corner size for the current corner. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder` | `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel.Builder#setTopRightCornerSize(float)(float cornerSize)` Sets the top right corner size for the current corner. |

## Public constructors

### Builder

```
public Builder()
```

### Builder

```
public Builder(ShapeAppearanceModel other)
```

## Public methods

### build

```
public ShapeAppearanceModel build()
```

Builds an instance of a `https://developer.android.com/reference/com/google/android/material/shape/ShapeAppearanceModel`

### setAllCornerSizes

```
public ShapeAppearanceModel.Builder setAllCornerSizes(CornerSize cornerSize)
```

Sets all corner sizes.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize` | the corner size to use for all four corners. |

### setAllCornerSizes

```
public ShapeAppearanceModel.Builder setAllCornerSizes(float cornerSize)
```

Sets the corner size of all four corner treatments to `cornerSize`.

### setAllCorners

```
public ShapeAppearanceModel.Builder setAllCorners(CornerTreatment cornerTreatment)
```

Sets all corner treatments.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment cornerTreatment` | the corner treatment to use for all four corners. |

### setAllCorners

```
public ShapeAppearanceModel.Builder setAllCorners(@CornerFamily int cornerFamily, float cornerSize)
```

Sets all corner treatments to `https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment`s generated from a `cornerFamily` and `cornerSize`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily` | The family to be used to create the `https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment`s for all four corners. May be one of `https://developer.android.com/reference/com/google/android/material/shape/CornerFamily#ROUNDED()` or `https://developer.android.com/reference/com/google/android/material/shape/CornerFamily#CUT()`. |
| `float cornerSize` | The size to be used to create the `https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment`s for all four corners. |

### setAllEdges

```
public ShapeAppearanceModel.Builder setAllEdges(EdgeTreatment edgeTreatment)
```

Sets all edge treatments.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment edgeTreatment` | the edge treatment to use for all four edges. |

### setBottomEdge

```
public ShapeAppearanceModel.Builder setBottomEdge(EdgeTreatment bottomEdge)
```

Sets the edge treatment for the bottom edge.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment bottomEdge` | the desired treatment. |

### setBottomLeftCorner

```
public ShapeAppearanceModel.Builder setBottomLeftCorner(CornerTreatment bottomLeftCorner)
```

Sets the corner treatment for the bottom left corner.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment bottomLeftCorner` | the desired treatment. |

### setBottomLeftCorner

```
public ShapeAppearanceModel.Builder setBottomLeftCorner(
    @CornerFamily int cornerFamily,
    CornerSize cornerSize
)
```

Sets the corner treatment for the bottom left corner.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily` | the family to use to create the corner treatment |
| `https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize` | the `https://developer.android.com/reference/com/google/android/material/shape/CornerSize` to use for the corner |

### setBottomLeftCorner

```
public ShapeAppearanceModel.Builder setBottomLeftCorner(@CornerFamily int cornerFamily, float cornerSize)
```

Sets the corner treatment for the bottom left corner.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily` | the family to use to create the corner treatment |
| `float cornerSize` | the size to use for the corner |

### setBottomLeftCornerSize

```
public ShapeAppearanceModel.Builder setBottomLeftCornerSize(CornerSize cornerSize)
```

Sets the bottom left corner size for the current corner.

### setBottomLeftCornerSize

```
public ShapeAppearanceModel.Builder setBottomLeftCornerSize(float cornerSize)
```

Sets the bottom left corner size for the current corner.

### setBottomRightCorner

```
public ShapeAppearanceModel.Builder setBottomRightCorner(CornerTreatment bottomRightCorner)
```

Sets the corner treatment for the bottom right corner.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment bottomRightCorner` | the desired treatment. |

### setBottomRightCorner

```
public ShapeAppearanceModel.Builder setBottomRightCorner(
    @CornerFamily int cornerFamily,
    CornerSize cornerSize
)
```

Sets the corner treatment for the bottom right corner.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily` | the family to use to create the corner treatment |
| `https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize` | the `https://developer.android.com/reference/com/google/android/material/shape/CornerSize` to use for the corner |

### setBottomRightCorner

```
public ShapeAppearanceModel.Builder setBottomRightCorner(@CornerFamily int cornerFamily, float cornerSize)
```

Sets the corner treatment for the bottom right corner.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily` | the family to use to create the corner treatment |
| `float cornerSize` | the size to use for the corner |

### setBottomRightCornerSize

```
public ShapeAppearanceModel.Builder setBottomRightCornerSize(CornerSize cornerSize)
```

Sets the bottom right corner size for the current corner.

### setBottomRightCornerSize

```
public ShapeAppearanceModel.Builder setBottomRightCornerSize(float cornerSize)
```

Sets the bottom right corner size for the current corner.

### setCornerSizeOverride

```
public ShapeAppearanceModel.Builder setCornerSizeOverride(int cornerPositionSet, CornerSize cornerSize)
```

### setLeftEdge

```
public ShapeAppearanceModel.Builder setLeftEdge(EdgeTreatment leftEdge)
```

Sets the edge treatment for the left edge.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment leftEdge` | the desired treatment. |

### setRightEdge

```
public ShapeAppearanceModel.Builder setRightEdge(EdgeTreatment rightEdge)
```

Sets the edge treatment for the right edge.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment rightEdge` | the desired treatment. |

### setTopEdge

```
public ShapeAppearanceModel.Builder setTopEdge(EdgeTreatment topEdge)
```

Sets the edge treatment for the top edge.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment topEdge` | the desired treatment. |

### setTopLeftCorner

```
public ShapeAppearanceModel.Builder setTopLeftCorner(CornerTreatment topLeftCorner)
```

Sets the corner treatment for the top left corner.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment topLeftCorner` | the desired treatment. |

### setTopLeftCorner

```
public ShapeAppearanceModel.Builder setTopLeftCorner(@CornerFamily int cornerFamily, CornerSize cornerSize)
```

Sets the corner treatment for the top left corner.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily` | the family to use to create the corner treatment |
| `https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize` | the `https://developer.android.com/reference/com/google/android/material/shape/CornerSize` to use for the corner |

### setTopLeftCorner

```
public ShapeAppearanceModel.Builder setTopLeftCorner(@CornerFamily int cornerFamily, float cornerSize)
```

Sets the corner treatment for the top left corner.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily` | the family to use to create the corner treatment |
| `float cornerSize` | the size to use for the corner |

### setTopLeftCornerSize

```
public ShapeAppearanceModel.Builder setTopLeftCornerSize(CornerSize cornerSize)
```

Sets the top left corner size for the current corner.

### setTopLeftCornerSize

```
public ShapeAppearanceModel.Builder setTopLeftCornerSize(float cornerSize)
```

Sets the top left corner size for the current corner.

### setTopRightCorner

```
public ShapeAppearanceModel.Builder setTopRightCorner(CornerTreatment topRightCorner)
```

Sets the corner treatment for the top right corner.

| Parameters |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/shape/CornerTreatment topRightCorner` | the desired treatment. |

### setTopRightCorner

```
public ShapeAppearanceModel.Builder setTopRightCorner(@CornerFamily int cornerFamily, CornerSize cornerSize)
```

Sets the corner treatment for the top right corner.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily` | the family to use to create the corner treatment |
| `https://developer.android.com/reference/com/google/android/material/shape/CornerSize cornerSize` | the `https://developer.android.com/reference/com/google/android/material/shape/CornerSize` to use for the corner |

### setTopRightCorner

```
public ShapeAppearanceModel.Builder setTopRightCorner(@CornerFamily int cornerFamily, float cornerSize)
```

Sets the corner treatment for the top right corner.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/com/google/android/material/shape/CornerFamily int cornerFamily` | the family to use to create the corner treatment |
| `float cornerSize` | the size to use for the corner |

### setTopRightCornerSize

```
public ShapeAppearanceModel.Builder setTopRightCornerSize(CornerSize cornerSize)
```

Sets the top right corner size for the current corner.

### setTopRightCornerSize

```
public ShapeAppearanceModel.Builder setTopRightCornerSize(float cornerSize)
```

Sets the top right corner size for the current corner.