Are there any sample projects with source code based on LittlevGL?

This is more of an architectural question than one that I can provide a direct sample to.

Like I said before, one way of approaching it (but this is not the only one) is that you have functions for creating screens 1, 2, and 3. When LittlevGL starts, you manually create screen 1 (and all its child objects), and set it as the root object using lv_scr_load. You then delete whatever the previous screen was.

lv_obj_t * next_scr = create_screen2();
lv_obj_t * prev_scr = lv_scr_act();
lv_scr_load(next_scr);
lv_obj_del_async(prev_scr); /*not sure if async is needed here or not */

Inside LV_EVENT_CLICKED handlers registered on the buttons, you basically do the same thing, but obviously you would create different screens.

There are several ways you can approach the problem. I can’t provide a more specific code example without some more information about what result you’re looking to get. Do you need a transition between screens, or is an instant flip like this acceptable? How much memory do you have? Can you afford to store three screens in RAM (to avoid needing to recreate them each time) or are you constrained to only having one in RAM at a time?