cancel
Showing results for 
Search instead for 
Did you mean: 

Create a new screen for each UI page VS play with visible/invisible widgets. Which is best practice?

ElPueblo
Associate II

Hello,

I'm working on a UI with touchGFX, and I was wondering which is the better practice in order to maximize performances and memory managment: is it better to create a new screen for each page of the UI, or to keep screens at minimum and to play with invisible/visible widgets?

I'm creating a menu to setup a weekly schedule. I use a single screen for the entire setup flow, and for each step of the setup I turn visible only the widgets I need. When the user completes that step and pass to the next one, all those widgets become invisible and new ones become visible.

I'm proceeding like this because the choices made in the previous steps influence the aspect of the following steps, and being in the same screen its easier to access those info. But since the widget counter is going through the roof, I'm wondering is this approach will give me performance issue in the future!

Do you have any advice/consideration?

1 ACCEPTED SOLUTION

Accepted Solutions
LouisB
ST Employee

Hello @ElPueblo,

The main difference is that with different screens, the whole screen is invalidated whereas with only one screen, only the updated areas are (widget that changed).

So, if you only have little, small changes across your screen, and the background doesn't change, then you may have better performances with only one screen.
However, one screen application may need a better organization of your project when you have a lot of widgets.

I hope it helps,

Regards

Louis BOUDO
ST Software Developer | TouchGFX

View solution in original post

1 REPLY 1
LouisB
ST Employee

Hello @ElPueblo,

The main difference is that with different screens, the whole screen is invalidated whereas with only one screen, only the updated areas are (widget that changed).

So, if you only have little, small changes across your screen, and the background doesn't change, then you may have better performances with only one screen.
However, one screen application may need a better organization of your project when you have a lot of widgets.

I hope it helps,

Regards

Louis BOUDO
ST Software Developer | TouchGFX