# AnimBuilder

Artifact: [androidx.navigation:navigation-common](https://developer.android.com/jetpack/androidx/releases/navigation) [View Source](https://cs.android.com/search?q=file:androidx/navigation/NavOptionsBuilder.android.kt+class:androidx.navigation.AnimBuilder) Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

*** ** * ** ***


```
@NavOptionsDsl
public final class AnimBuilder
```

<br />

*** ** * ** ***

DSL for setting custom Animation or Animator resources on a `https://developer.android.com/reference/androidx/navigation/NavOptionsBuilder`

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/navigation/AnimBuilder#AnimBuilder()()` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/navigation/AnimBuilder#getEnter()()` The custom Animation or Animator resource for the enter animation. |
| `final int` | `https://developer.android.com/reference/androidx/navigation/AnimBuilder#getExit()()` The custom Animation or Animator resource for the exit animation. |
| `final int` | `https://developer.android.com/reference/androidx/navigation/AnimBuilder#getPopEnter()()` The custom Animation or Animator resource for the enter animation when popping off the back stack. |
| `final int` | `https://developer.android.com/reference/androidx/navigation/AnimBuilder#getPopExit()()` The custom Animation or Animator resource for the exit animation when popping off the back stack. |
| `final void` | `https://developer.android.com/reference/androidx/navigation/AnimBuilder#setEnter(kotlin.Int)(int value)` The custom Animation or Animator resource for the enter animation. |
| `final void` | `https://developer.android.com/reference/androidx/navigation/AnimBuilder#setExit(kotlin.Int)(int value)` The custom Animation or Animator resource for the exit animation. |
| `final void` | `https://developer.android.com/reference/androidx/navigation/AnimBuilder#setPopEnter(kotlin.Int)(int value)` The custom Animation or Animator resource for the enter animation when popping off the back stack. |
| `final void` | `https://developer.android.com/reference/androidx/navigation/AnimBuilder#setPopExit(kotlin.Int)(int value)` The custom Animation or Animator resource for the exit animation when popping off the back stack. |

## Public constructors

### AnimBuilder

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public AnimBuilder()
```

## Public methods

### getEnter

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public final int getEnter()
```

The custom Animation or Animator resource for the enter animation.

Note: Animator resources are not supported for navigating to a new Activity

### getExit

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public final int getExit()
```

The custom Animation or Animator resource for the exit animation.

Note: Animator resources are not supported for navigating to a new Activity

### getPopEnter

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public final int getPopEnter()
```

The custom Animation or Animator resource for the enter animation when popping off the back stack.

Note: Animator resources are not supported for navigating to a new Activity

### getPopExit

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public final int getPopExit()
```

The custom Animation or Animator resource for the exit animation when popping off the back stack.

Note: Animator resources are not supported for navigating to a new Activity

### setEnter

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public final void setEnter(int value)
```

The custom Animation or Animator resource for the enter animation.

Note: Animator resources are not supported for navigating to a new Activity

### setExit

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public final void setExit(int value)
```

The custom Animation or Animator resource for the exit animation.

Note: Animator resources are not supported for navigating to a new Activity

### setPopEnter

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public final void setPopEnter(int value)
```

The custom Animation or Animator resource for the enter animation when popping off the back stack.

Note: Animator resources are not supported for navigating to a new Activity

### setPopExit

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public final void setPopExit(int value)
```

The custom Animation or Animator resource for the exit animation when popping off the back stack.

Note: Animator resources are not supported for navigating to a new Activity