WorksheetsLesson 4-8
Total questions: 91
Worksheet time: 46mins
What is the official IDE for Android development?
Android Studio
VS Code
IntelliJ IDEA
Eclipse
Which build system does Android Studio use?
Gradle
Maven
Make
Ant
Which file contains the build configuration for a module?
config.xml
build.gradle
settings.json
make.file
Which file describes essential information like package name app components?
AndroidManifest.xml
strings.xml
MainActivity.kt
Layout.xml
Which component represents a single screen with a user interface?
Provider
Receiver
Activity
Service
Which lifecycle method is called when an Activity is first created?
onInit()
onStart()
onCreate()
onResume()
Which method is used to inflate a layout resource in an Activity?
setContentView()
inflate()
setLayout()
drawLayout()
What are UI building blocks like Buttons and TextViews called?
Tags
Views
Widgets
Elements
What is a View that contains other Views called?
Wrapper
Container
Holder
ViewGroup
Which directory holds non-code assets like images and XML?
bin
res
src
assets
Which generated class references all resources by ID?
Id
R
Config
Res
Where are string resources typically defined?
res/values/strings.xml
AndroidManifest.xml
src/main/strings.kt
res/layout/text.xml
What tool allows visual design of UI layouts?
Layout Editor
View Builder
UI Designer
Interface Maker
What software simulates an Android device on your computer?
Emulator
Simulator
VirtualBox
Docker
Which window displays system logs and app messages?
Console
Terminal
Logcat
Debug
What unit is recommended for layout dimensions?
dp
in
mm
px
What unit is recommended for text size?
px
sp
dp
pt
What are properties like 'android:text' in XML called?
Settings
Parameters
Attributes
Fields
What library binds UI components in layouts to data sources?
Event Binding
Model Binding
Data Binding
View Binding
What is the root tag for a layout using data binding?
<root>
<binding>
<layout>
<data>
What syntax is used for a binding expression in XML?
${...}
{{...}}
@{...}
#{...}
Data binding largely eliminates the need for which call?
startActivity()
onCreate()
findViewById()
setContentView()
Which widget is efficient for displaying large lists?
ScrollView
GridView
RecyclerView
ListView
Which class adapts a data set to be displayed in a RecyclerView?
Presenter
Manager
Adapter
Controller
Which object holds references to views for a single list item?
ItemHolder
ViewHolder
ViewContainer
RowView
Which component positions items in a RecyclerView?
PositionManager
LayoutManager
ItemLayer
GridManager
Which adapter method creates a new ViewHolder?
createRow()
newViewHolder()
onCreateViewHolder()
makeHolder()
Which adapter method binds data to a ViewHolder?
onBindViewHolder()
fillView()
setData()
bindRow()
Which adapter method returns the total number of items?
getItemCount()
count()
length()
getSize()
What process allows reusing views that scroll off-screen?
Recycling
Caching
Destroying
Hiding
What is the space *outside* a view’s boundary called?
Border
Padding
Spacing
Margin
What object is used to request an action from another component?
Message
Intent
Packet
Signal
Which Intent type targets a specific app component directly?
Explicit Intent
Direct Intent
Hard Intent
Implicit Intent
Which Intent type asks the system to handle an action?
General Intent
Explicit Intent
Soft Intent
Implicit Intent
What data structure manages the history of visited activities?
Task Queue
History List
Back Stack
App Stack
Which navigation button moves up the app’s hierarchy?
Back button
Up button
Home button
Menu button
Which navigation button moves to the previous screen historically?
Recent button
Back button
Exit button
Up button
What represents a reusable portion of UI within an activity?
Segment
Part
Section
Fragment
Which Jetpack library simplifies app navigation?
Router
Pathfinder
Navigator
Navigation Component
Which XML resource defines all navigation paths?
Path Config
Navigation Graph
Sitemap
Route Map
Which container swaps destinations in the Navigation Component?
NavHost
NavContainer
ScreenFrame
FragmentHolder
Which object manages app navigation within a NavHost?
NavController
NavManager
RouteController
PathGuide
What are individual screens (fragments) called in a NavGraph?
Destinations
Points
Stops
Nodes
What connects two destinations in a NavGraph?
Path
Link
Edge
Action
What Gradle plugin ensures type-safe argument passing?
TypeCheck
ArgGuard
IntentSafe
Safe Args
Does a Fragment have its own lifecycle?
No
Only when added
Only in dialogs
Yes
Which Fragment method is used to inflate its layout?
onCreateView()
onCreateLayout()
onInflate()
onViewInit()
Which UI pattern displays a side menu?
Hamburger Menu
Side Bar
Slide Menu
Navigation Drawer
Which layout acts as a container for a Navigation Drawer?
DrawerLayout
MenuLayout
SlidingLayout
SideLayout
What component typically provides the 'hamburger' icon?
Status Bar
Action Bar
Toolbar / App Bar
Nav Bar
Which navigation pattern uses a bar at the bottom of the screen?
Bottom Navigation
Tab Bar
Footer
Lower Menu
Which state indicates an Activity is initializing?
Resumed
Active
Started
Created
Which lifecycle method is the first to be called?
onInit()
onResume()
onCreate()
onStart()
In which state is the Activity visible but not interactive?
Resumed
Created
Paused
Started
Which state indicates the Activity has user focus?
Resumed
Active
Running
Started
Which method is called when the Activity is partially obscured?
onPause()
onHide()
onBackground()
onStop()
Which method is called when the Activity is no longer visible?
onPause()
onEnd()
onStop()
onDestroy()
Which method performs final cleanup before destruction?
onDestroy()
onDelete()
onTrash()
onCleanup()
What happens to the Activity when the device is rotated?
It is destroyed and recreated
Nothing happens
It is paused
It is stopped
Which method is used to save UI state before destruction?
persist()
saveState()
onSaveInstanceState()
onBackup()
What object stores the saved state data?
Dictionary
Bundle
Package
Map
Which specific Fragment method is called when associated with context?
onConnect()
onBind()
onAttach()
onLink()
Which specific Fragment method is called when disassociated?
onUnlink()
onRelease()
onDisconnect()
onDetach()
Which class allows logging debug messages?
Console
Log
Debug
Which Log method is for informational messages?
Log.e()
Log.v()
Log.i()
Log.d()
Which package provides lifecycle-aware components?
androidx.lifecycle
android.aware
android.life
androidx.component
What interface does an Activity implement to show it has a lifecycle?
LifecycleHolder
LifecycleOwner
Owner
Host
What interface observes lifecycle changes?
LifecycleObserver
Monitor
Listener
Watcher
What is a collection of activities that the user interacts with called?
Process
Task
Group
Job
Does the Back Stack follow LIFO (Last In, First Out)?
FIFO
No
Random
Yes
Which method is called when an Activity starts after being stopped?
onRestart()
onReboot()
onRelapse()
onResume()
What principle suggests dividing code into distinct sections?
Separation of concerns
Don’t repeat yourself
Keep it simple
Single responsibility
Which component should handle UI logic and data preparation?
Activity
XML
Fragment
ViewModel
Which component typically displays data but stays passive?
Database
ViewModel
UI Controller (Activity/Fragment)
Repository
Does a ViewModel survive configuration changes like rotation?
No
Yes
Only in background
Only if saved
Which class is used to create or retrieve a ViewModel?
ViewModelFactory
VMCreate
ViewModelProvider
ViewModelBuilder
What is an observable data holder class?
LiveData
Stream
Observable
Flow
Which LiveData subclass allows updating its value?
WriteableLiveData
ChangeableLiveData
DynamicData
MutableLiveData
How do you listen for changes in LiveData?
observe()
watch()
subscribe()
listen()
LiveData is 'lifecycle-aware'. What does this mean?
Updates only active observers
Updates on background
Does not update
Updates always
What binding syntax is used for two-way data binding?
@{...}
${...}
@={...}
#{...}
Which helper class transforms LiveData values?
Mappers
Converters
Transformations
Changers
Which transformation modifies the value itself?
edit()
modify()
map()
change()
Which transformation converts to a new LiveData source?
toggle()
switchMap()
swap()
flatMap()
What is needed to pass arguments to a ViewModel constructor?
Injector
ArgLoader
Builder
ViewModelFactory
Where should UI state be stored to persist across rotation?
Activity
ViewModel
View
Intent
What pattern describes events flowing up and data flowing down?
Bidirectional flow
Circular flow
Unidirectional Data Flow
Linear flow
Why should ViewModel not hold a reference to a View?
To prevent memory leaks
Views are null
It crashes
It is not allowed
Which ViewModel subclass provides access to the Application context?
GlobalViewModel
AndroidViewModel
ContextViewModel
AppViewModel
What Gradle build feature enables Data Binding?
buildFeatures { dataBinding true }
enableDataBinding
useDataBinding
bindingOn
What does the 'Observer' interface require implementing?
onEvent()
onChanged()
onNotify()
onUpdate()
