Is InteractionDialog advised to be used instead of Dialog for UI threading?

10 views
Skip to first unread message

P5music

unread,
Dec 14, 2020, 4:17:04 AM12/14/20
to CodenameOne Discussions
Is InteractionDialog advised to be used in order to have a better threading on the user interface?

I was said that the InteractionDialog is less heavy in terms of blocking the main UI thread.
Is it so?
Thanks in advance

Steve Hannah

unread,
Dec 14, 2020, 9:23:15 AM12/14/20
to codenameone...@googlegroups.com
It is a choice.  Both are viable, but be aware that a Dialog is *actually* a separate form.   When you're looking at the current form underneath it, you're actually looking at an image snapshot of the form that is taken just before the dialog is shown.  This works great most of the time, but there are edge cases where you might want the background form to be "live".  One such case is if the form includes any peer components (e.g. web browser), since they won't be rendered to a mutable image.  Due to this, I often opt for InteractionDialog or one of its derivatives (ToastBar, Sheet, etc..).  They play nicely with native components.



--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/b5fb0991-efde-45e5-b2e7-2080263a32aen%40googlegroups.com.


--
Steve Hannah
Software Developer
Codename One
Reply all
Reply to author
Forward
0 new messages