Wed. Sep 28, 2011
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:
- Select Picture,
- Show Story, and
- 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:
and once more with the following:
- Procedures, with no parameters,
- Global variables,
- Conditionals, and last but not least, with
- Problem decomposition.
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:
- Populate a list of choices, and add a List Picker (Select Picture), so the user can chose one among those choices.
- Arrange so the user can see, on their screen, the image that corresponds to their choice.
- Add one more list, which contains the captions for the images. Arrange so together with the image, the caption is shown.
- Introduce the Reset button early on. It is helpful as you develop your app!
- Now it is time to deal with the "Show the Story" part:
- Add a button to your interface.
- How is your application going to remember what images the user chose, and in which order? Where can you store this info?
- 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?