https://kotlinlang.org logo
m

Manuel Wrage

11/01/2019, 10:32 AM
Why is compose using framework dialogs and popup windows instead of replicate them with composable functions?
l

Luca Nicoletti

11/01/2019, 10:37 AM
It really is not
There are
@Composable
functions for dialogs
g

Giorgos Neokleous

11/01/2019, 10:46 AM
There was a similar discussion recently. Dialogs will use the window manager under the hood: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1572469774151700
m

Manuel Wrage

11/01/2019, 10:49 AM
I would like to hear the reason behind it because it could easily be reproduced with only composable functions. I already created popupmenus without native windows.
m

Mark Murphy

11/01/2019, 11:01 AM
it because it could easily be reproduced with only composable functions
I had a discussion in this channel on this topic a month or so ago. Google's argument is that your approach only works if the child "window" is limited to be shown in the boundaries of the parent window. By definition, a window cannot draw outside of its boundaries, which means that a popup drawn by a window cannot go outside of the window. While in many cases that may be acceptable, once you start thinking of freeform multiwindow (e.g., Chrome OS devices), it starts to become a bigger limitation.
m

Manuel Wrage

11/01/2019, 11:04 AM
Thanks for the explanation sounds reasonable. Looks like i will have to write my own dialog thing:D
r

romainguy

11/01/2019, 2:20 PM
Why don't you want to use Windows for those popups?
2 Views