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
- Accessing Views in Code: Declaring Variables 5:20
- Accessing Views in Code: Assigning Variables 6:24
- Initializing a Button 1 objective
- Making a Button Do Something 4:35
- Adding the OnClick Method 2:36
- Android Programming Basics 5 questions
- Generating a Random Number 4:08
- Choosing a Random Fact 4:52
- Using the Random Class 4 objectives
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
Now that we've covered a bit of the generated code, it's time to write our own! In this video we'll write Java code in our FunFactsActivity class to declare our TextView and Button.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
samira khan
Full Stack JavaScript Techdegree Student 269 Points0 Answers
-
Kham Mangar
2,273 Points1 Answer
-
Debojit Mitra
2,299 Points1 Answer
-
John Cuddihy
5,493 Points1 Answer
-
mario tawil
181 Points2 Answers
-
mario tawil
181 PointsError:Failed to complete Gradle execution. Cause:Write access is allowed from event dispatch thread only
Posted by mario tawilmario tawil
181 Points1 Answer
-
praveen kumar reddy
159 Points0 Answers
-
Collin Bottomlee
553 Points5 Answers
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