Recall & Review
beginner
What is the entry point of an Android app?
The entry point is the MainActivity class, which extends
AppCompatActivity and contains the onCreate() method.Click to reveal answer
beginner
What does the
setContentView() method do in an Android activity?It sets the layout resource file that defines the UI for the activity, making the UI visible on the screen.
Click to reveal answer
beginner
Which file defines the UI layout for the first Android app?
The UI layout is defined in an XML file located in
res/layout/activity_main.xml.Click to reveal answer
intermediate
What is the purpose of the
AndroidManifest.xml file?It declares app components, permissions, and metadata. It tells Android which activity to start first.
Click to reveal answer
beginner
How do you display a simple text message on the screen in your first Android app?
By adding a
TextView element in the layout XML file with the desired text.Click to reveal answer
Which method is called when an Android activity starts?
✗ Incorrect
The onCreate() method is called first when the activity is created.
Where do you define the UI layout for an Android activity?
✗ Incorrect
UI layouts are defined in XML files inside the res/layout folder.
What does
setContentView(R.layout.activity_main) do?✗ Incorrect
It sets the activity's UI to the layout defined in activity_main.xml.
Which file tells Android which activity to launch first?
✗ Incorrect
AndroidManifest.xml declares the launcher activity.
What is the purpose of the
TextView in Android?✗ Incorrect
TextView is used to show text on the screen.
Explain the steps to create and display a simple 'Hello World' message in your first Android app.
Think about the activity lifecycle and UI layout files.
You got /4 concepts.
Describe the role of AndroidManifest.xml in launching your first Android app.
It acts like a map for Android to know what to start.
You got /3 concepts.