> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kontext.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Keeping the ad clear of your controls

> An overlay strip sits at the bottom or top of the container, a pause card at the top; the SDK keeps both clear of the system bars and display cutout that overlap the container.

An overlay strip sits at the bottom or top of the container, a pause card at the top; the SDK keeps both clear of the system bars and display cutout that overlap the container. If your player draws its own controls there (a title, a progress bar, buttons), pass the space they take as `insets`:

```kotlin theme={null}
// Your control bar is controlBar.height pixels tall, at the bottom of the player.
try {
    overlayAd?.show(playerContainer, Insets.of(0, 0, 0, controlBar.height))
} catch (e: VideoAdException) {
    // not shown: expired, another ad on screen, container too small, …
}
```

* `Insets` is `androidx.core.graphics.Insets`, in pixels. They add to the system bars and cutout: measure from their edge, not from the screen's.
* They stay while the ad is shown, through resizes and rotations. If your controls change size while an ad is on screen, the ad keeps the insets it was shown with.
* The ad still has to fit at half its size or more. Insets and the container's padding count against the space, so `ContainerTooSmall` includes them.
* A full-screen pause ad ignores them: it fills the container, and its own controls keep clear of the edges.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.