Previous form does not completely disappears on Codename One

ε祈祈猫儿з 提交于 2019-12-06 21:31:27

These things are always hard to track but I'm guessing the peer component collides in some way with the new form.

Make sure you don't call postInvalidate unless you really have to and even then you should generally limit and avoid it when possible as it might conflict with our drawing logic.

Also make sure you didn't change the opacity of the parent forms e.g. if you changed the form UIID.

It looks like the solution has been found. Indeed I had a native method that initialized the camera and the surfaceview. I was running this method on the EDT and then showing the new MainForm.

Indeed I embraced the initialization method in an invokeAndBlock() block. Now it looks like the kind of lag is far less visible (I could not see it). In my own logic I can explain it with the fact that the invokeAndBlock() will do the initialization job on a separate thread and when it's fully ready (so the camera and surfaceview are ready to be shown), the MainForm can be shown.

Could it be the actual solution @Shai ?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!