<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/own-your-dialog-taking-control-of-compose-s-dialog-window-bqoqywbtu" -->

---
title: Own Your Dialog: Taking Control of Compose’s Dialog Window
description: Compose's Dialog composable opens a separate Android Window that isn't part of the composition, giving you an unstyleable black scrim and a default window...
canonical: https://daily.dev/posts/own-your-dialog-taking-control-of-compose-s-dialog-window-bqoqywbtu
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Own Your Dialog: Taking Control of Compose’s Dialog Window | daily.dev
og:description: Compose's Dialog composable opens a separate Android Window that isn't part of the composition, giving you an unstyleable black scrim and a default window...
og:url: https://daily.dev/posts/own-your-dialog-taking-control-of-compose-s-dialog-window-bqoqywbtu
og:image: https://api.daily.dev/og/posts/bqOQywBTu.png
og:image:alt: Own Your Dialog: Taking Control of Compose’s Dialog Window
og:image:width: 1200
og:image:height: 630
og:locale: en
---

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

# Own Your Dialog: Taking Control of Compose’s Dialog Window

**[Medium](https://daily.dev/sources/medium_js)** · 10 min read · 0 upvotes · 0 comments

## Summary

Compose's Dialog composable opens a separate Android Window that isn't part of the composition, giving you an unstyleable black scrim and a default window animation you can't override with Modifiers. A single composable function (SetDialogWindow) reaches into that window via DialogWindowProvider to zero out the dim amount and window animations, letting you build the scrim and card entirely in Compose. The piece also covers wiring a boolean-driven Transition so exit animations finish before the dialog leaves composition, hosting dialogs as Navigation 3 destinations via a custom OverlayScene, and bridging the dialog window's own OnBackInvokedDispatcher so a predictive back gesture can drive the scrim fade and card scale live, frame by frame, instead of only firing on gesture completion. Full runnable sample code is provided on GitHub.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@lucf15/own-your-dialog-taking-control-of-composes-dialog-window-46ab9efdcc75>

## Questions this post answers

### How do I remove the default dim scrim and animation from a Jetpack Compose Dialog?

Cast the dialog's LocalView.current.parent to DialogWindowProvider to get its actual Android Window, then call setDimAmount(0f) and setWindowAnimations(0) on it as the first line inside the Dialog's content. This neutralizes the platform-level scrim and enter/exit animation, which are set via WindowManager.LayoutParams and have no Compose Modifier equivalent, letting you draw a fully custom scrim Box and animate the card yourself.

_daily.dev surfaces practical Compose fixes like this for developers wiring custom dialog behavior._

### Why can't a Jetpack Compose Dialog participate in predictive back animations?

Compose's AndroidDialog.android.kt registers a back callback that is always enabled and fires onDismissRequest only once, on completion, with no progress reported in between, so the system can't drive a predictive back preview for it. Building a live, drag-following exit animation requires bridging the dialog window's own OnBackInvokedDispatcher (available on Android 13+) into a NavigationEventDispatcher that Compose can subscribe to via snapshotFlow.

_Track gesture-level platform quirks like this on daily.dev when building custom Compose navigation._

### How do I keep a dialog's exit animation from being cut off when its visibility state flips to false in Compose?

Use a MutableTransitionState with rememberTransition and guard the composable's presence with the check visibleState.currentState || visibleState.targetState || !visibleState.isIdle, rather than just checking the boolean directly. Without that check, setting visible to false removes the dialog from composition immediately, before the exit animation defined by transition.animateFloat has a chance to play out.

_daily.dev helps Compose developers keep up with animation and state-handling patterns like this._

## Similar posts on daily.dev

- [Morphing a Floating Action Button into a Dialog in Compose Multiplatform](https://daily.dev/posts/morphing-a-floating-action-button-into-a-dialog-in-compose-multiplatform-j41msje7q) · Joe Birch · 0 upvotes · 0 comments
- [Curtain Reveal Transition in Jetpack Compose; Inspired by Blinkit’s Valentine’s Week Experience](https://daily.dev/posts/curtain-reveal-transition-in-jetpack-compose-inspired-by-blinkit-s-valentine-s-week-experience-7wdgsdz9a) · ProAndroidDev · 0 upvotes · 0 comments
- [Build for every screen with the latest Jetpack Compose updates from Android Developer Summit](https://daily.dev/posts/build-for-every-screen-with-the-latest-jetpack-compose-updates-from-android-developer-summit-ovznsmhgq) · Android Developers Blog · 2 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#kotlin](https://daily.dev/tags/kotlin), [#jetpack-compose](https://daily.dev/tags/jetpack-compose)

[View this post on daily.dev](https://daily.dev/posts/own-your-dialog-taking-control-of-compose-s-dialog-window-bqoqywbtu)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Own Your Dialog: Taking Control of Compose’s Dialog Window","url":"https://daily.dev/posts/own-your-dialog-taking-control-of-compose-s-dialog-window-bqoqywbtu","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/own-your-dialog-taking-control-of-compose-s-dialog-window-bqoqywbtu"},"datePublished":"2026-08-28T00:23:19.187Z","dateModified":"2026-08-28T00:27:31.810Z","description":"Compose's Dialog composable opens a separate Android Window that isn't part of the composition, giving you an unstyleable black scrim and a default window...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/567998dc2ab34939034fa15578a654e7?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/567998dc2ab34939034fa15578a654e7?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/own-your-dialog-taking-control-of-compose-s-dialog-window-bqoqywbtu","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"android,kotlin,jetpack-compose","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Own Your Dialog: Taking Control of Compose’s Dialog Window"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/own-your-dialog-taking-control-of-compose-s-dialog-window-bqoqywbtu#faq","mainEntity":[{"@type":"Question","name":"How do I remove the default dim scrim and animation from a Jetpack Compose Dialog?","acceptedAnswer":{"@type":"Answer","text":"Cast the dialog's LocalView.current.parent to DialogWindowProvider to get its actual Android Window, then call setDimAmount(0f) and setWindowAnimations(0) on it as the first line inside the Dialog's content. This neutralizes the platform-level scrim and enter/exit animation, which are set via WindowManager.LayoutParams and have no Compose Modifier equivalent, letting you draw a fully custom scrim Box and animate the card yourself. daily.dev surfaces practical Compose fixes like this for developers wiring custom dialog behavior."}},{"@type":"Question","name":"Why can't a Jetpack Compose Dialog participate in predictive back animations?","acceptedAnswer":{"@type":"Answer","text":"Compose's AndroidDialog.android.kt registers a back callback that is always enabled and fires onDismissRequest only once, on completion, with no progress reported in between, so the system can't drive a predictive back preview for it. Building a live, drag-following exit animation requires bridging the dialog window's own OnBackInvokedDispatcher (available on Android 13+) into a NavigationEventDispatcher that Compose can subscribe to via snapshotFlow. Track gesture-level platform quirks like this on daily.dev when building custom Compose navigation."}},{"@type":"Question","name":"How do I keep a dialog's exit animation from being cut off when its visibility state flips to false in Compose?","acceptedAnswer":{"@type":"Answer","text":"Use a MutableTransitionState with rememberTransition and guard the composable's presence with the check visibleState.currentState || visibleState.targetState || !visibleState.isIdle, rather than just checking the boolean directly. Without that check, setting visible to false removes the dialog from composition immediately, before the exit animation defined by transition.animateFloat has a chance to play out. daily.dev helps Compose developers keep up with animation and state-handling patterns like this."}}]}
```

