Hi,
I want to create my first LVGL application and my I came from mobile app development, where we use the mentioned pattern.
Now I want to find any good example for an application with multiple screen, where the data is global and not only within the screen. Every tutorial show single page applications, where the app state is within the page. This is not what I want or is LVGL not the right tool for that?
Does anybody has a best practice for an application with multiple screens?
Just for clarification, do you mean:
- multiple screens (meaning two or more physical displays),
- or an application with multiple pages on a single display?
You’re right. I didn’t explain it correct. I want a multi page app and maybe want to use fragments.
For evaluation, you could create your app in SquareLine Studio.
When you export it, you will find a recommended structure.

You can then add some or all of your custom code into ui_events.c
, as this file won’t get overwritten by future exports.