cancel
Showing results for 
Search instead for 
Did you mean: 

Swipe Container

snnzdmr1
Associate III

hi,

1- What's the best way to speed up the swipe container transition?

2- How can I change the animation of swipe container? 

3- SwipeContainer.cpp can not modify. how do I make changes permanently ? 

 

thanks for help 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @snnzdmr1 ,

Unfortunately, there is no direct way of changing the attributes you mentioned, however, it is possible to change the source code of the library, or SwipeContainer.cpp in this case.
To apply the changes, first you need to make a copy of both SwipeContainer.cpp and SwipeContainer.hpp in your project (For example, put a copy of them under gui/include/gui/common and gui/src/gui/common). Then you can make your changes on these files. The TouchGFX linker will automatically use your customized code instead of the original one.
In SwipeContainer.cpp you can see there is a variable called duration in animateLeft() and animateRight(). Changing the value of it will affect the speed. Beside that, you can change the EasingEquation function that is used for animating. 

You can read more about modifying standard widgets here 

 

I hope this helps you.

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

1 REPLY 1

Hello @snnzdmr1 ,

Unfortunately, there is no direct way of changing the attributes you mentioned, however, it is possible to change the source code of the library, or SwipeContainer.cpp in this case.
To apply the changes, first you need to make a copy of both SwipeContainer.cpp and SwipeContainer.hpp in your project (For example, put a copy of them under gui/include/gui/common and gui/src/gui/common). Then you can make your changes on these files. The TouchGFX linker will automatically use your customized code instead of the original one.
In SwipeContainer.cpp you can see there is a variable called duration in animateLeft() and animateRight(). Changing the value of it will affect the speed. Beside that, you can change the EasingEquation function that is used for animating. 

You can read more about modifying standard widgets here 

 

I hope this helps you.

Mohammad MORADI
ST Software Developer | TouchGFX