# BottomAppBarTopEdgeTreatment

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

*** ** * ** ***


```
public class BottomAppBarTopEdgeTreatment extends EdgeTreatment implements Cloneable
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [com.google.android.material.shape.EdgeTreatment](https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment) ||
|   | ↳ | [com.google.android.material.bottomappbar.BottomAppBarTopEdgeTreatment](https://developer.android.com/reference/com/google/android/material/bottomappbar/BottomAppBarTopEdgeTreatment) |

*** ** * ** ***

Top edge treatment for the bottom app bar which "cradles" a circular `https://developer.android.com/reference/com/google/android/material/floatingactionbutton/FloatingActionButton`.

This edge features a downward semi-circular cutout from the edge line. The two corners created by the cutout can optionally be rounded. The circular cutout can also support a vertically offset FloatingActionButton; i.e., the cut-out need not be a perfect semi-circle, but could be an arc of less than 180 degrees that does not start or finish with a vertical path. This vertical offset must be positive.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/com/google/android/material/bottomappbar/BottomAppBarTopEdgeTreatment#BottomAppBarTopEdgeTreatment(float,float,float)( float fabMargin, float roundedCornerRadius, float cradleVerticalOffset )` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/com/google/android/material/bottomappbar/BottomAppBarTopEdgeTreatment#getEdgePath(float,float,float,com.google.android.material.shape.ShapePath)( float length, float center, float interpolation, https://developer.android.com/reference/com/google/android/material/shape/ShapePath shapePath )` Generates a `https://developer.android.com/reference/com/google/android/material/shape/ShapePath` for this edge treatment. |
| `float` | `https://developer.android.com/reference/com/google/android/material/bottomappbar/BottomAppBarTopEdgeTreatment#getFabCornerRadius()()` |
| `void` | `https://developer.android.com/reference/com/google/android/material/bottomappbar/BottomAppBarTopEdgeTreatment#setFabCornerSize(float)(float size)` |

| ### Inherited methods |
|---|
| From [com.google.android.material.shape.EdgeTreatment](https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment) |---|---| | `void` | `[getEdgePath](https://developer.android.com/reference/com/google/android/material/shape/EdgeTreatment#getEdgePath(float,float,com.google.android.material.shape.ShapePath))(float length, float interpolation, https://developer.android.com/reference/com/google/android/material/shape/ShapePath shapePath)` **This method is deprecated.** Does not support interpolation. <br /> | |

## Public constructors

### BottomAppBarTopEdgeTreatment

```
public BottomAppBarTopEdgeTreatment(
    float fabMargin,
    float roundedCornerRadius,
    float cradleVerticalOffset
)
```

| Parameters |
|---|---|
| `float fabMargin` | the margin in pixels between the cutout and the fab. |
| `float roundedCornerRadius` | the radius, in pixels, of the rounded corners created by the cutout. A value of 0 will produce a sharp cutout. |
| `float cradleVerticalOffset` | vertical offset, in pixels, of the `https://developer.android.com/reference/com/google/android/material/floatingactionbutton/FloatingActionButton` being cradled. An offset of 0 indicates the vertical center of the `https://developer.android.com/reference/com/google/android/material/floatingactionbutton/FloatingActionButton` is positioned on the top edge. |

## Public methods

### getEdgePath

```
public void getEdgePath(
    float length,
    float center,
    float interpolation,
    ShapePath shapePath
)
```

Generates a `https://developer.android.com/reference/com/google/android/material/shape/ShapePath` for this edge treatment.

EdgeTreatments have an origin of (0, 0) and a destination of (0, length) (i.e. they represent the top edge), and are automatically rotated and scaled as necessary when applied to other edges. Only the horizontal, top EdgeTreatment needs to be defined in order to apply it to all four edges.

| Parameters |
|---|---|
| `float length` | the length of the edge. |
| `float center` | the distance to the center of the edge. This takes into account any offset added by the proceeding corner. Drawing anything at (center, 0) will be center aligned with the shape. Normally you'll want to use this instead of length / 2. |
| `float interpolation` | the interpolation of the edge treatment. Ranges between 0 (none) and 1 (fully) interpolated. Custom edge treatments can implement interpolation to support shape transition between two arbitrary states. Typically, a value of 0 indicates that the custom edge treatment is not rendered (i.e. that it is a straight line), and a value of 1 indicates that the treatment is fully rendered. Animation between these two values can "heal" or "reveal" an edge treatment. |
| `https://developer.android.com/reference/com/google/android/material/shape/ShapePath shapePath` | the `https://developer.android.com/reference/com/google/android/material/shape/ShapePath` that this treatment should write to. |

### getFabCornerRadius

```
public float getFabCornerRadius()
```

### setFabCornerSize

```
public void setFabCornerSize(float size)
```