MIT App Inventor supports apps having multiple screens, but due to the way that App Inventor is implemented, they recommend that apps have no more than 10 screens total – or risk running out of memory or seeing the Blocks editor crash or hang!
They have a page of information about this issue and you should look at that if you are writing an app with more than about 10 screens.
They suggest it may be possible to simulate multiple screens using just one extra screen, depending on the application. They provide hints as to how to do those hints may be insufficient for new App Inventor programmers.
A reader asked for help on this so I created this tutorial.
Since this app has two screens, this tutorial is split into two sections, one for each screen, and then a third section discussing optional modifications.
The basic app is called ManyScreens. The optional modifications are in ManyScreens2_Buttons (source code links at end of this post)
This demonstration app features 4 buttons – the first button displays “Screen 1”, the second button displays “Screen 2” and so on. These buttons could have any label on them appropriate for your application, such as “Register Account”, “Reserve a space”, “Display reservations” or what ever make sense for your app.
Pressing Screen 1 displays this screen – note the label at the top and the photo on the page.
This screen appears when pressing Screen 3. Note that the text label references Screen 3.
The button Do Something! is a placeholder for adding code to do something unique for this screen. For this application all it does is close the screen and return to the main app screen, Screen1.
Continue reading An App Inventor recommended way of handling multiple similar screens