Goal: Practice gathering input from your users, passing information between intents, and using string resources. Try and implement ArrayAdapters if possible. Also, practice using
Log messages and breakpoints, as seen in last night's homework.
Have you ever played Mad Libs? Mad Libs are silly stories with some of the words missing. Without looking at the story, you are prompted to fill out a list of nouns, verbs, adjectives, etc. Then, copy them onto another piece of paper that contains a story, missing those crucial words that you are now providing. The idea is to pick bizarre words without knowing what the story is, and then when you fill them in the results can be hilarious.
Make an app where users can play Mad Libs. Prompt them to provide several types of words. Then, use those words to fill in the blanks of a story. Let the user clear the story and start over if they'd like.
- Learn how to use the string.xml file to hold a static string array: How to create static array string in Android XML
- Using the weekend homework on Robolectric and Espresso as a guide, write tests for your Mad Libs application. Make sure all tests are passing before implementing any new features. Then, write new tests for those features. Do not move on to additional features or functionalities until tests pass.
- Add multiple stories, and allow users to select the story they'd like to fill in.
- Experiment with different input types. For example, create a field with two possible values (such as day or night, decaf or regular, etc) and use a radio button.
Peer Code Review
- Does the app gather user input and pass it to another activity.
- Are click listeners successfully attached to elements with the
- Are the git commits clear and descriptive?
- Is the README detailed and descriptive, with all necessary elements?
- Is the code properly indented? Do naming conventions make sense?