0
0
Android Kotlinmobile~5 mins

First Android app in Android Kotlin - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AonCreate()
BonStart()
ConResume()
DonPause()
Where do you define the UI layout for an Android activity?
AIn Kotlin code only
BIn res/layout XML files
CIn AndroidManifest.xml
DIn build.gradle
What does setContentView(R.layout.activity_main) do?
AStarts a new activity
BDeclares app permissions
CSets the UI layout for the current activity
DStops the app
Which file tells Android which activity to launch first?
AAndroidManifest.xml
BMainActivity.kt
Cactivity_main.xml
Dstrings.xml
What is the purpose of the TextView in Android?
ATo display images
BTo play audio
CTo handle user input
DTo display text
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.