INQ241B
Mobile Apps

Activity 14

Textfields & Collections

In this activity you will create a to-do list app.

  1. Create a new app with a textfield and a button that are side-by-side. The textfield should be initially empty, but the button should display the text ‘Add’.

  2. When the user presses the add button, the text should be added to a string collection. The contents of the string collection should be displayed in a vertical list like the following:

    todo
  3. Each item in the collection should have a number on the left from 1 up to the number of items in the collection. Each item should also have a button on the right. The text of the button should be ‘Remove’. When the button is pressed, it should remove the item that it corresponds to.

Submission

Please show your source code and run your scripts for the instructor or lab assistant.