# AdOverlayInfo.Builder

Artifact: [androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/common/AdOverlayInfo.java+class:androidx.media3.common.AdOverlayInfo.Builder)

*** ** * ** ***


```
public final class AdOverlayInfo.Builder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo.Builder#Builder(android.view.View,int)(https://developer.android.com/reference/android/view/View.html view, @https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo.Purpose int purpose)` Creates a new builder. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo` | `https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo.Builder#build()()` Returns a new `https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo` instance with the current builder values. |
| `https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo.Builder#setDetailedReason(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html detailedReason)` Sets an optional, detailed reason that the view is on top of the player. |

## Public constructors

### Builder

```
public Builder(View view, @AdOverlayInfo.Purpose int purpose)
```

Creates a new builder.

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/view/View.html view` | The view that is overlaying the player. |
| `@https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo.Purpose int purpose` | The purpose of the view. |

## Public methods

### build

```
public AdOverlayInfo build()
```

Returns a new `https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo` instance with the current builder values.

### setDetailedReason

```
@CanIgnoreReturnValue
public AdOverlayInfo.Builder setDetailedReason(@Nullable String detailedReason)
```

Sets an optional, detailed reason that the view is on top of the player.

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/AdOverlayInfo.Builder` | This builder, for convenience. |