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

Using Multiple Lists Together (That Expand on Demand)

An alternative to using small lists as structures is to use multiple lists, with each list holding a piece of the data.

Let’s design one more data structure out of a list: a phone book contact entry. Our contacts app will be very simple. Each entry will contain a person’s name and phone number. We will need two lists for this (one to hold the names and one to hold the numbers), and they will work together to keep the information organized.

This example works much like the one in Figure 6.17, where we added a new item each time a button was clicked. In this case, when a button is clicked, we’re going to take two pieces of information, the name and number, from the user via two text boxes and ...

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