Double animation swipes away the new form

8 views
Skip to first unread message

P5music

unread,
Aug 21, 2020, 11:08:59 AM8/21/20
to CodenameOne Discussions
In my app a mainForm calls another form.
I succeeded in creating a working back button on the new form.
After some changes now I have a strange effect.
I have code like this

Toolbar toolbar=new Toolbar();
// It's the same with Toolbar toolbar=getToolbar(); and with global toolbar true
currentForm.setToolbar(toolbar);
toolbar.setEnabled(true);
toolbar.showToolbar();

the last instruction showToolBar() produces a strange effect: 
let's say the new form is created and I can see its layout coming with a speedy animation from right to left, 
but then another speedy animation from right to left swipes the form off the screen.
On the toolbar the back command is visible but it is not responsive (also the menu button is present but not responsive).

What happened? I made some changes to the app, indeed I added the side menu to the mainForm and the secondary form, but it is the same also without it now.
Thanks in advance

Shai Almog

unread,
Aug 22, 2020, 1:18:13 AM8/22/20
to CodenameOne Discussions
hide/show toolbar were designed for running when the form is already showing. You don't need to invoke it when it isn't,
Reply all
Reply to author
Forward
0 new messages