Multiple Form LayeredPanes and Layout animation issue

35 views
Skip to first unread message

Thomas

unread,
Sep 26, 2018, 11:45:29 PM9/26/18
to CodenameOne Discussions
I have an overlay component (actually a container) that is painted into the Form layeredPane (it is added to the LayeredPane returned by form.getFormLayeredPane(MyOverlay.class, true) where MyOverlay is the name of my class) and I have an interactionDialog (in formMode = true) that can be created by some action on my form and that will be rendered in front of my form and my overlay component.
The problem I have is that, when the interactionDialog is shown or disposed (when it grow or shrink), the overlay component disappear from the screen and reappear at the end of the animation.
If I set the interactionDialog to setAnimateShow(false), I don't have this issue (the overlay component do not seem to temporarilly disappear as I do not see any "blink" effect that may indicate it was removed for one frame)
So why is the animateUnlayoutAndWait() function of the Container class blocking the rendering of the form LayeredPanes (other than the one beeing animated) during the duration of the animation? This seems like a bug

Shai Almog

unread,
Sep 27, 2018, 12:21:32 AM9/27/18
to CodenameOne Discussions
There are some edge cases in the paint order of overlays. If you can isolate this into a standalone test case we can debug it.

Thomas

unread,
Sep 27, 2018, 12:49:36 AM9/27/18
to CodenameOne Discussions
I will try to create a standalone test case tomorrow. I tracked the issue down to the thisContainer.repaint(); call into the MorphAnimation updateState() function (If I commant this repaint, I do not see the component animation occur, of course, but the underlying layeredPane do not dissapear during the laps time of the animation) so I guess it has something to do with layeredPanes actually beeing on different branches of the components hierarchy (when a container is repainted, there is a recursive repaint call on its parents but has layered panes are not directly parents of one another, this might be the issue.) I'm too tired to analyze this correctly now though so I will have a look tomorrow ;)

Thomas

unread,
Sep 27, 2018, 6:28:41 PM9/27/18
to CodenameOne Discussions
Here is a video showing the issue:


and the source of this standalone test case:



On Thursday, September 27, 2018 at 6:21:32 AM UTC+2, Shai Almog wrote:

Shai Almog

unread,
Sep 28, 2018, 12:34:07 AM9/28/18
to CodenameOne Discussions
Can you file it as an issue so it can be assigned and followed?
Reply all
Reply to author
Forward
0 new messages