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

The One-Dimensional List

A single list is a one-dimensional structure. This is just like any list you would write on paper. It has items in an order from top to bottom (or left to right, depending on how you want to think about it). If we have a list, we can add things to it, whenever we want, nearly forever.

Here are some code blocks that will take the text from a text box and add it to a list every time a button is pressed (see Figure 6.17). This could be the beginnings of a note-taking app or a reminder app. The user types something in, and that is added to the list inside the phone when the button is pressed.

Image

Figure 6.17 A copy of the text ...

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