Disable toolbar title slide animation

54 views
Skip to first unread message

P5music

unread,
Feb 18, 2021, 12:47:03 PM2/18/21
to CodenameOne Discussions

I set the app name as toolbar title in every form in my CodenameOne app.

I see that transitioning from a form to another is made with animation
but
also the toolbar title gets animated
so that
I see the same title greyed out and going out of sight when the new title is displayed.
Is there a way to avoid it?
It seems that I have to disable SlideFade but how? I cannot find it in theme editor.

Thanks in advance

Shai Almog

unread,
Feb 18, 2021, 11:49:11 PM2/18/21
to CodenameOne Discussions
There are theme constants that define the default form slide animations: https://www.codenameone.com/developer-guide.html#theme-constants-section

Specifically: formTransitionOut

P5music

unread,
Feb 19, 2021, 5:36:34 AM2/19/21
to CodenameOne Discussions
I do not understand what I have to do with that.
So my workaround is
to set the title as empty before every form transition, then set the real value in the forms' showListeners.
I do not know if there is a more elegant solution managing some theme constant.
I tried to change the form theme, as I did with the side command, but there is not any title animation value to change.
Regards

Shai Almog

unread,
Feb 20, 2021, 1:30:54 AM2/20/21
to CodenameOne Discussions
Are you using the theme designer or CSS. If the former just go to the constants tab in the theme and add a constant:
formTransitionOut=none if I remember correctly.

If the latter:
#Constants {
    //  ....
    formTransitionOut: "none";

P5music

unread,
Feb 20, 2021, 11:28:27 AM2/20/21
to CodenameOne Discussions


In the designer the value was "empty" but I prefer to stick to my workaround so the transition still happens.
Regards

Shai Almog

unread,
Feb 20, 2021, 9:03:57 PM2/20/21
to CodenameOne Discussions
Sorry. You can use "slide" as the value. It will then have a slide transition instead of slidefade.
Reply all
Reply to author
Forward
0 new messages