# PictureInPictureDelegate.Event

Artifact: [androidx.core:core-pip](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/pip/PictureInPictureDelegate.kt+class:androidx.core.pip.PictureInPictureDelegate.Event) Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/core#1.0.0-alpha04)

*** ** * ** ***


```
public final class PictureInPictureDelegate.Event
```

<br />

*** ** * ** ***

Represents the PiP event emitted from the system.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event` | `https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event#ENTERED()` App has fully settled in PiP mode, app usually needs to switch its Activity layout to PiP mode. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event` | `https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event#ENTER_ANIMATION_END()` Entering PiP animation ends, apps usually do not need to take actions for this state. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event` | `https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event#ENTER_ANIMATION_START()` Entering PiP animation starts, this offers an app the chance to hide UI elements such as the overlays upon the video player. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event` | `https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event#EXITED()` App has exited PiP mode, app usually needs to switch its Activity layout to full-screen mode. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event` | `https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event#STASHED()` PiP window is stashed. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event` | `https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event#UNSTASHED()` PiP window is un-stashed. |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/pip/PictureInPictureDelegate.Event#toString()()` |

## Public fields

### ENTERED

```
public static final @NonNull PictureInPictureDelegate.Event ENTERED
```

App has fully settled in PiP mode, app usually needs to switch its Activity layout to PiP mode. Compatibility notes: this event is available since API 24, see also `https://developer.android.com/reference/androidx/core/app/PictureInPictureModeChangedInfo#isInPictureInPictureMode()`.

### ENTER_ANIMATION_END

```
public static final @NonNull PictureInPictureDelegate.Event ENTER_ANIMATION_END
```

Entering PiP animation ends, apps usually do not need to take actions for this state. Compatibility notes: this event is available since API 35, see also `https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat#isTransitioningToPip()`

### ENTER_ANIMATION_START

```
public static final @NonNull PictureInPictureDelegate.Event ENTER_ANIMATION_START
```

Entering PiP animation starts, this offers an app the chance to hide UI elements such as the overlays upon the video player. Compatibility notes: this event is available since API 35, see also `https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat#isTransitioningToPip()`.

### EXITED

```
public static final @NonNull PictureInPictureDelegate.Event EXITED
```

App has exited PiP mode, app usually needs to switch its Activity layout to full-screen mode. Compatibility notes: this event is available since API 24, see also `https://developer.android.com/reference/androidx/core/app/PictureInPictureModeChangedInfo#isInPictureInPictureMode()`.

### STASHED

```
public static final @NonNull PictureInPictureDelegate.Event STASHED
```

PiP window is stashed. A stashed PiP means it is only partially visible to the user, with some parts of it being off-screen. Compatibility notes: this event is available since API 31, see also `https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat#isStashed()`.

### UNSTASHED

```
public static final @NonNull PictureInPictureDelegate.Event UNSTASHED
```

PiP window is un-stashed. A stashed PiP means it is only partially visible to the user, with some parts of it being off-screen. Compatibility notes: this event is available since API 31, see also `https://developer.android.com/reference/androidx/core/app/PictureInPictureUiStateCompat#isStashed()`.

## Public methods

### toString

```
public @NonNull String toString()
```