abk-chicago / Android_Rainbow

First Project in the Android 101 Course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rainbow

This project will give you a chance to practice the skills you learned in the first lesson of the Android 101 course. Follow the instructions below:

Create an Android Studio Project

  1. Create a new Android Studio project
  2. Name the project "Rainbow"
  3. Make sure that the target API level is below that of your testing environment.

Add Buttons to the App

  1. Open the app's activity_main.xml file.
  2. Change the parent viewgroup to a linear layout
  3. Add six buttons to the main screen
  4. Each button's text attribute should be the name of a different color

Create Listeners for Each Button

  1. Create a listener and event handler for each button in MainActivity.java
  2. In each event handler, change the view's background color to the color that corresponds to the button's title

TIP: Remember to use android.R.color.color_name to get access to the colors provided by android. You can see which colors are available in the documentation.

Build, Run, and Test Your App

  1. Build and run your app using the your preferred test environment.
  2. Test each button to make sure that it changes the background color appropriately.
  3. Remember to use logs and the debugger when you run into issues.

If everything works, congratulations! You've just built your first Android app on your own from scratch!

Submit

Send your completed app to your Project Manager.

Challenge

Experiment with different properties of Button and Linear Layout. To improve the look of your app.

About

First Project in the Android 101 Course