# 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)

*** ** * ** ***


```
class AdOverlayInfo.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

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

## Public constructors

### Builder

```
Builder(view: View!, @AdOverlayInfo.Purpose purpose: Int)
```

Creates a new builder.

| Parameters |
|---|---|
| `view: https://developer.android.com/reference/android/view/View.html!` | The view that is overlaying the player. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/AdOverlayInfo.Purpose purpose: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The purpose of the view. |

## Public functions

### build

```
fun build(): AdOverlayInfo!
```

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

### setDetailedReason

```
@CanIgnoreReturnValue
fun setDetailedReason(detailedReason: String?): AdOverlayInfo.Builder!
```

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

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