10-152-383 - Mobile Programming 1

2.2 Project

More Android Widget Practice

In this project, you will get some more experience with a variety of Android widgets as you design and build an app from scratch.

In class, we quickly reviewed how to create a splash screen and several new widgets:

For this project, you will use each of these new widgets, plus these old widgets:

And you will work with two other new widgets:

  1. Create a new Android application called MoreWidgetPractice. It should target API level 19 (KitKat). You may need to change the target framework in the project options too.
  2. Set up a splash screen. You can use text, your own image or an image that you find. If you use an image from somewhere else, be sure to cite your source. You can do this with a comment in the Activity class for the splash screen. You can try one of the icon tools we saw in class, such as Android Asset Studio.
  3. In the Main.axml layout, build a custom screen that uses at least one of each of the widgets listed above. Some ideas for the app: track feedings at a zoo, recording sports statistics, collect contact info for group members, configure options for a product that's being sold, etc. Please feel free to come up with other ideas.
  4. You will want to create or find another set of images to use for the custom button. You can add a comment in the MainActivity class to cite any external sources.
  5. Some of the widgets should have specific interactions:

    1. If the user sets the rating bar to 5 stars, display an alert dialog with a cancel button that dismisses the dialog. The text of the alert should be "Wow! 5 stars".
    2. Use a toast message to display the item the user selected in the spinner.
    3. When the toggle button is turned on, uncheck one or more checkboxes.
    4. If the user taps the custom button, display a toast message with the number of stars currently set in the rating bar.
  6. For the other widgets, you can design your own interactions, which could be to do nothing at all.

This is an opportunity to be creative and have fun with your new Android skills. Good luck.