O'Reilly logo

Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps by Mark Sherman, Derek Walter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Switching Screens

To open another screen, you use the block under the Control palette called open another screen. This block requires one input, which must be the name of the screen you want to open, in a text block. See Figure 8.3 for the programming that opens Screen2 when a button is pressed.

Image

Figure 8.3 Programming an app to switch screens.

Screen behavior is like a small deck of cards on a table. You start with just one card, which is Screen1, the first screen you see. When you open another screen, that screen opens on top of the previous one, like another card being put on the deck (see Figure 8.4).

Figure 8.4 Think of multiple screens ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required