2020-04-08 04:11 AM
hello,
In my program I have some screens and I switch between screens by programaticily. If a button pressed below code switches screen
void Screen1_View::changeScreenToScreen2(){
static_cast<FrontendApplication*>(Application::getInstance())->gotoScreen_Screen2CoverTransitionSouth();
}
This code works fine but I want to change cover time too. Is it possible to change screen transition time ? Is it fixed ?
Solved! Go to Solution.
2020-04-08 05:59 AM
Hi,
Usually, transitions are the same duration for every screen in the application. So the only way to change the animation time is in touchgfx/Transitions/CoverTransition.hpp (Or touchgfx/Transitions/ScreenTrantision.hpp). Increase steps to increase duration, etc.
CoverTransition(const uint8_t transitionSteps = 20)
: Transition(),
handleTickCallback(this, &CoverTransition::tickMoveDrawable),
direction(templateDirection),
animationSteps(transitionSteps),
...
/Martin
2020-04-08 05:59 AM
Hi,
Usually, transitions are the same duration for every screen in the application. So the only way to change the animation time is in touchgfx/Transitions/CoverTransition.hpp (Or touchgfx/Transitions/ScreenTrantision.hpp). Increase steps to increase duration, etc.
CoverTransition(const uint8_t transitionSteps = 20)
: Transition(),
handleTickCallback(this, &CoverTransition::tickMoveDrawable),
direction(templateDirection),
animationSteps(transitionSteps),
...
/Martin
2020-04-08 06:40 AM
Thanks, Martin
2021-07-12 10:05 AM
How when we need two speeds or more ???
2021-07-13 12:14 AM
I guess you need different speed for the same transition based on different scenarios ? I think you should create your own custom transition through code, by copying the code and changing it according to what you need.
Otherwise the "easiest" but annoying solution may be to just mimic the cover transition by faking a screen transition and sliding the widgets/elements of your new screen over what you have.
/Romain