2024-01-12 09:30 AM
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
Solved! Go to Solution.
2024-01-16 06:41 AM
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.
2024-01-16 06:41 AM
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.