# FadeProvider

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

*** ** * ** ***


```
public final class FadeProvider implements VisibilityAnimatorProvider
```

<br />

*** ** * ** ***

A class that configures and is able to provide an Animator that fades a view.

## Summary

| ### Public fields |
|---|---|
| `float` | `https://developer.android.com/reference/com/google/android/material/transition/platform/FadeProvider#incomingEndThreshold()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/com/google/android/material/transition/platform/FadeProvider#FadeProvider()()` |

| ### Public methods |
|---|---|
| `Animator` | `https://developer.android.com/reference/com/google/android/material/transition/platform/FadeProvider#createAppear(ViewGroup,View)(ViewGroup sceneRoot, View view)` Should return an Animator that animates in the appearing target `view`. |
| `Animator` | `https://developer.android.com/reference/com/google/android/material/transition/platform/FadeProvider#createDisappear(ViewGroup,View)(ViewGroup sceneRoot, View view)` Should return an Animator that animates out the disappearing target `view`. |
| `float` | `https://developer.android.com/reference/com/google/android/material/transition/platform/FadeProvider#getIncomingEndThreshold()()` Get the fraction at which the appearing fade animation will end between 0 and 1. |
| `void` | `https://developer.android.com/reference/com/google/android/material/transition/platform/FadeProvider#setIncomingEndThreshold(float)(float incomingEndThreshold)` Set the fraction by which an appearing fade animation should end between 0 and 1. |

## Public fields

### incomingEndThreshold

```
public float incomingEndThreshold
```

## Public constructors

### FadeProvider

```
public FadeProvider()
```

## Public methods

### createAppear

```
public Animator createAppear(ViewGroup sceneRoot, View view)
```

Should return an Animator that animates in the appearing target `view`.

| Parameters |
|---|---|
| `ViewGroup sceneRoot` | The root of the transition hierarchy, which can be useful for checking configurations such as RTL |
| `View view` | The view that is appearing |

### createDisappear

```
public Animator createDisappear(ViewGroup sceneRoot, View view)
```

Should return an Animator that animates out the disappearing target `view`.

| Parameters |
|---|---|
| `ViewGroup sceneRoot` | The root of the transition hierarchy, which can be useful for checking configurations such as RTL |
| `View view` | The view that is disappearing |

### getIncomingEndThreshold

```
public float getIncomingEndThreshold()
```

Get the fraction at which the appearing fade animation will end between 0 and 1.

| See also |
|---|---|
| `https://developer.android.com/reference/com/google/android/material/transition/platform/FadeProvider#setIncomingEndThreshold(float)` |   |

### setIncomingEndThreshold

```
public void setIncomingEndThreshold(float incomingEndThreshold)
```

Set the fraction by which an appearing fade animation should end between 0 and 1.

This can be used to stagger animations when this class' resulting animator is used inside an AnimatorSet. If the containing AnimatorSet has a total duration of 100 milliseconds and incomingEndThreshold is set to .75f, this class' animator will run and complete (the view will be completely faded in) after the AnimatorSet has run for 75 milliseconds.