Michal Klusák
06/05/2026, 10:11 AMSYSTEM_ALERT_WINDOW permission? I would like to create something like custom toasts.jw
06/05/2026, 12:44 PMMichal Klusák
06/05/2026, 3:55 PMjw
06/05/2026, 3:56 PMjw
06/05/2026, 3:57 PMjw
06/05/2026, 3:58 PMAlex Styl
06/06/2026, 2:05 AMDialog does. It renders the content on its own platform window. This means that they will render on top of everything, BUT they don't allow clicks to anything behind them.
> I would like to create something like custom toasts
For this, I would not use a Dialog since you probably don't want to block the entire UI when your toasts are displayed.
Snackbars in Material have their own component (snackbarhost iirc) that wraps the app/screen and places the rendered toast in front of everything else. I would do the same.
In Unstyled, I am using a little utility called Portal that does exactly this (gives you a root level 'host' and allow you to render to it from anywhere in the UI tree). I use this for Unstyled Tooltips, because the original tooltips in compose are modal and I needed them to be non-modal.