Labs‎ > ‎

Lab04: LifeStory - Lists and List Picker

What we will do:

We will create an app for the user to create a story, based on a set of provided images. Specifically, the user is presented with three buttons:
  1. Select Picture, 
  2. Show Story, and
  3. Start All Over.
When the "Select Picture" button is pressed, the user is presented with a set of choices, each describing an image. The user selects one choice, by touching it. They can select as many of the choices as they like. As she is choosing images, a story, in words, is developed, and added on the screen.

When the "Show Story" button is pressed, The selected images are shown, in the order they were selected, like a slide show. 

The "start All Over" button resets the state of the app.

What we will practice with:

In the context of this app, we will have the chance to deal with:
  • Lists, and List Pickers
 and once more with the following:
  • Procedures, with no parameters,
  • Global variables,
  • Conditionals, and last but not least, with
  • Problem decomposition.

Get Started

Get the app from this QR code, and install it on your phone. Experiment with it.


Download the images attached at the bottom of this page. They are .jpg files that you will need for this app.

Form small groups of 2 or 3 people, and try to come up with a list of smaller tasks that you should tackle, as you program this app. 

Here is such a possible list of smaller tasks:

  1. Populate a list of choices, and add a List Picker (Select Picture), so the user can chose one among those choices.
  2. Arrange so the user can see, on their screen, the image that corresponds to their choice.
  3. Add one more  list, which contains the captions for the images. Arrange so together with the image, the caption is shown.
  4. Introduce the Reset button early on. It is helpful as you develop your app!
  5. Now it is time to deal with the "Show the Story" part:
  6. Add a button to your interface.
  7. How is your application going to remember what images the user chose, and in which order? Where can you store this info?
  8. Once you have this question worked out, how are you going to arrange so one picture is shown for a few milliseconds, then the next one comes in, etc?

Č
ċ
ď
Stella Kakavouli,
Sep 28, 2011, 5:44 PM
ą
ď
blue.jpg
(52k)
Stella Kakavouli,
Sep 28, 2011, 6:51 AM
ą
ď
Stella Kakavouli,
Sep 28, 2011, 6:51 AM
ą
ď
Stella Kakavouli,
Sep 28, 2011, 6:51 AM
ą
ď
palms.jpg
(47k)
Stella Kakavouli,
Sep 28, 2011, 6:52 AM
ą
ď
read.jpg
(23k)
Stella Kakavouli,
Sep 28, 2011, 6:52 AM
ą
ď
Stella Kakavouli,
Sep 28, 2011, 6:52 AM
Comments