cancel
Showing results for 
Search instead for 
Did you mean: 

Screen transition with fade vs container move+fade animation

BennyTang
Associate II

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.

 

 

 

 

4 REPLIES 4
Osman SOYKURT
ST Employee

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.

Osman SOYKURT
ST Software Developer | TouchGFX

Hi @Osman SOYKURT 

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.

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.

Osman SOYKURT
ST Software Developer | TouchGFX
Osman SOYKURT
ST Employee

Hello @BennyTang , have you tried my suggestion?

Osman SOYKURT
ST Software Developer | TouchGFX