Here are a few important points:
- you cannot and should not close screen1.
- likewise, you should never have to open screen1; you return to it by closing the OTHER screen you are in
Basically, screen1 is your base interface. You can open other screens, but always need something to return to when finished. Another very important thing to remember is that you should not open a screen without closing it when done. Each time you open a screen, you open ANOTHER instance of it. With its own variables values and setting. If you start with Screen1 and have it open Screen2, which opens Screen3, and then this one opens Screen2 again, you have TWO copies of Screen2 pending. Do that often enough, and your device runs out of memory.
Notice in your blocks that the “close screen” had to be put in a function, because nothing can be appended to that block? So in essence, your Screen2 Initialize calls the cerrar function, which closes the screen, and normally does not even return to perform the opening of Screen1 (which would be irrelevant anyway). What you see after Screen2 closes is not the Screen1 that got opened, but the already open Screen1 that was there when Screen2 was called.