2025-11-02 7:41 PM
Hi,
I am working on some screen transitions.
I need to make my "page" transitions move and fade in/out together in the process.
Below are the issues I found
=========================
For screen tranisition
=========================
I can start the screen fade animation on its own.
But if I start the screen transition together, this fade animation is not working for some reason.
==========================
For container mix-in animation
==========================
I can start both fade/move animation together with the container.
But this way all my "pages" would need to be inside a "custom container" and I will only have 1 "screen"
All my hw key event will be jammed inside my MainScreenView, and introduce a mess in code structure.
Both of the methods require me to start fade animation MANUALLY for each object in the "page" which is very inconvenient.
But I can't find a way to do it with a for loop using the forEachChild() function.
Since the function gets a "Drawable" object, instead of "FadeAnimator" object, thus makes it difficult to call the startFadeAnimation directly.
2025-11-05 7:02 AM
Hello @BennyTang ,
You can't have 2 screen transition animation running at the same time (fade + wipe for instance), therefore this has to be coded manually. You don't need to individually fade each of the elements; instead you can make a copy of the current framebuffer and fade this one and move it at the same time. This is possible by using dynamic bitmaps. Plus, it will not cost you extra memory compared to using a regular native screen transition.
2025-11-05 7:29 PM
Thanks for the reply.
Since we need to have 2 screens moving and fading in/out at the same time.
1 screen from left to right, fade in
1 screen from right to left, fade out
Thus if I use the dynamic bit map method, then I would require 2 full screen dynamic bit map, which is A LOT.
Plus there are several widget that requires dynamic bit map in the screens already, which consume more RAM.
So I think this is not really feasible, thanks for the suggestion though.
2025-11-06 1:21 AM
Hi @BennyTang ,
Using screen transition is also costing an extra memory space in you RAM of the size of your framebuffer, so it's the same. My solution is not to use screen transition at all, but doing it custom:
1- make a copy of your current framebuffer to the dynamic bitmap (called dbmp)
2- fade out the newly created dynamic bitmap
3- introduce a bitmap (called b1) that represents your second screen content when you enter it, by simply moving the bitmap.
4- when the dbmp is fully faded out and b1 is at its final position, call the change screen from TouchGFX but with NO transition.
5- Done :)
Remark: step 2 and 3 can and should be working at same time if you want to realize the move+fade screen transition animation.
Remark 2: The framebuffer content will not or maybe change a tiny bit when doing the screen transition because the content b1 is just an image of what you have on screen 2.
2025-11-17 12:09 AM
Hello @BennyTang , have you tried my suggestion?