This course will be retired on July 14, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Simple Refactoring: Creating a New Class 5:54
- Creating a New Class 2 objectives
- Simple Refactoring: Using a New Class 6:28
- Simple Refactoring 5 questions
- Dynamically Changing the Background Color 3:51
- Dynamically Changing the Background Color 1 objective
- Adding More Colors 3:43
- Using the New Colors 3:42
- Adding Colors 1 objective
- Adding an App Icon 4:50
- Adding an App Icon 3 questions
Well done!
You have completed Build a Simple Android App with Java!

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
The last thing we need to do is pick a new background color each time we display a new fact. Try it yourself, then watch this video for my explanation.
Read Me!
Android recently updated the findViewById
method to be generic. This means, in most cases, that a cast (e.g. (RelativeLayout)
) is no longer necessary. If you don't see an error when using findViewById
, that just means you're on a newer version of Android than I am :)
Documentation
- RelativeLayout Class Reference
- Color Class Reference - Contains several Color constants you can use
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
katrina turqotte
175 Points1 Answer
-
Codrin Postu
8,022 Points1 Answer
-
PLUS
mochammad yalinulloh
Courses Plus Student 3,002 Points0 Answers
-
Noah Price
365 Points3 Answers
-
Soumitra Mehrotra
1,468 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up