Font size
WorksheetsLesson 9-13
Total questions: 98
Worksheet time: 49mins
Which storage type is volatile and lost on reboot?
Flash
Disk
SSD
RAM
Which API stores simple key-value pairs?
SQLite
Room
File
SharedPreferences
Which storage option allows saving private files?
Internal Storage
External Storage
Cloud
Public Storage
Which database engine is built into Android?
MySQL
MongoDB
PostgreSQL
SQLite
Which Jetpack library provides an abstraction over SQLite?
Room
House
Floor
Realm
What represents a table in Room?
Class
Entity
Object
Row
Which annotation marks a class as a Room Entity?
@Table
@Entity
@Database
@Row
What allows accessing the database?
DTO
DAO (Data Access Object)
Service
API
Which annotation marks an interface as a DAO?
@Interface
@Access
@Query
@Dao
Which annotation is used for raw SQL commands?
@SQL
@Raw
@Query
@Command
Which annotations perform modification operations?
@Insert, @Update, @Delete
@Put, @Patch, @Cut
@New, @Change, @Drop
@Add, @Edit, @Remove
Which component serves as the main access point to the DB?
Database
Controller
Manager
Gateway
Which annotation defines the primary key of a table?
@Key
@Id
@PrimaryKey
@Unique
Why should database operations run asynchronously?
Android requires it
To save battery
They are fast
To prevent blocking the main thread
What feature provides lightweight threads for async code?
Processes
Coroutines
Tasks
Threads
Which keyword marks a function that can be paused?
suspend
pause
yield
wait
Which Dispatcher is optimized for disk/network IO?
Dispatchers.Main
Dispatchers.Default
Dispatchers.IO
Dispatchers.GPU
Which Dispatcher is used for UI updates?
Dispatchers.Background
Dispatchers.IO
Dispatchers.Job
Dispatchers.Main
Which scope launches coroutines tied to a ViewModel?
mainScope
globalScope
lifecycleScope
viewModelScope
What does '@Volatile' ensure for a variable?
Immutability
Security
Visibility changes to other threads
Persistence
Which adapter subclass computes list differences efficiently?
SmartAdapter
ListAdapter
RecyclerAdapter
FastAdapter
Which utility class calculates the difference between two lists?
ListDiff
DiffCalc
CompareUtil
DiffUtil
Which callback method checks if two items represent the same object?
equals()
isSame()
compare()
areItemsTheSame()
Which callback method checks if item content matches?
isContentEqual()
match()
check()
areContentsTheSame()
Which method submits a new list to the ListAdapter?
updateList()
push()
submitList()
setList()
What allows creating custom XML attributes for binding?
Custom Views
Attr Setters
XML Hooks
Binding Adapters
Which annotation declares a Binding Adapter?
@Custom
@Bind
@Adapter
@BindingAdapter
Which method returns the view type for a position?
getItemViewType()
getClass()
getView()
getType()
What class type is useful for defining a restricted set of view types?
abstract class
sealed class
interface
open class
Which LayoutManager arranges items in a grid?
MatrixLayout
TableLayout
BoxManager
GridLayoutManager
What parameter determines the number of columns in a grid?
spanCount
size
width
colCount
What class allows dynamic sizing of grid items?
GridHelper
SizeCalc
SpanSizeLookup
SpanManager
How are headers typically handled in a RecyclerView?
Sticky view
Overlay
As a different ViewType
Separate list
Why is ListAdapter better than notifyDataSetChanged?
Better performance with animations
Typesafety
Easier to write
Less code
What method executes generic pending bindings immediately?
executePendingBindings()
render()
flush()
draw()
How can you cache the binding object in a ViewHolder?
In onBind
Static map
Global variable
In the constructor
Where should item click listeners usually be set?
In XML
In onBind
In MainActivity
In the ViewHolder
What allows multiple ViewHolders in one Adapter?
Overloading
Different view types
Generic types
Subclassing
Can a RecyclerView display heterogeneous data?
Yes
Only images
No
Only strings
Does ListAdapter run DiffUtil on the main thread?
Yes
Depends
Only for small lists
No, background thread
Where must app permissions be declared?
Gradle
AndroidManifest.xml
MainActivity
Settings
Which permission is required for network access?
WIFI
NETWORK
ACCESS
INTERNET
Which HTTP method retrieves data?
GET
PULL
FETCH
READ
Which HTTP method sends data to create a resource?
SEND
POST
PUSH
WRITE
Which library is a type-safe HTTP client for Android?
Volley
OkHttp
Retrofit
HttpClient
What is the root URL of a web API called?
Root Path
Base URL
Core Link
Home URL
What component converts JSON responses to objects?
Mapper
Serializer
Converter Factory
JSON Parser
Which library is often used for JSON parsing with Retrofit?
Moshi
Gson
JsonUtil
Jackson
Which annotation adds a parameter to the URL query string?
@Search
@Arg
@Query
@Param
Which annotation replaces a segment of the URL path?
@Part
@Segment
@Path
@Url
Which annotation defines the request body?
@Body
@Payload
@Content
@Data
What modern Kotlin feature handles async network calls?
Threads
Tasks
Futures
Coroutines
Which block handles exceptions in coroutines?
guard
if-else
try-catch
error-prone
How does Retrofit verify a successful response?
status == OK
check(200)
response.isSuccessful
valid()
Which library is recommended for loading images?
Glide
Picasso
Fresco
Loader
What handles image caching and resizing automatically?
Canvas
BitmapFactory
ImageView
Glide
What identifies the location of an image resource?
ID
Tag
Key
URI / URL
What image is shown while the actual image loads?
Thumb
Loading
Spinner
Placeholder
What image is shown if loading fails?
Default
Error image
Backup
Icon
Why should you not do network ops on the main thread?
Not allowed
Battery drain
Freezes the UI (ANR)
Too fast
What pattern mediates between different data sources?
Singleton
Proxy
Repository
Factory
What principle ensures data consistency?
Data Duplication
Mirroring
Single Source of Truth
Copying
What is the typical data flow for caching?
UI -> Network
Network -> UI
Network -> Database -> UI
Database -> Network
What enables offline app usage?
Memory
Cloud sync
Files
Local Database cache
Which Jetpack library handles deferrable background work?
AlarmManager
WorkManager
Service
JobScheduler
WorkManager guarantees execution when?
Constraints are met
Immediately
User clicks
App is open
Which class defines the actual background task?
Runner
Job
Worker
Task
Which method is the entry point for a Worker?
start()
execute()
doWork()
run()
Which WorkRequest runs only once?
UniqueRequest
OneTimeWorkRequest
VerifyRequest
SingleRequest
Which WorkRequest runs at intervals?
IntervalRequest
PeriodicWorkRequest
RepeatRequest
LoopRequest
What conditions like 'Requires Charging' called?
Constraints
Filters
Rules
Limits
What does doWork() return to indicate status?
Status
Result
Boolean
Code
How do you ensure tasks run in a specific order?
Stacking
Chaining
Listing
Ordering
What data objects pass arguments to/from Workers?
InputData / OutputData
Intent
Bundle
Map
Which Worker subclass supports coroutines?
SuspendWorker
CoroutineWorker
AsyncWorker
FutureWorker
How do you identify a Unique Work request?
Key
Unique Name
ID
Tag
What policy decides what to do if work already exists?
ExistingWorkPolicy
Mode
Rule
ConflictStrategy
How can you observe the status of a work request?
poll
getWorkInfoByIdLiveData
checkStatus
observeWork
What allows grouping multiple work requests?
Tags
Labels
Groups
Sets
What system handles retry timing for failed work?
Retry timer
Delay loop
Wait logic
Backoff policy
What system provides comprehensive UI design guidelines?
Metro
Flat Design
Human Interface
Material Design
What defines global styling attributes for the app?
Layout
Theme
Style
Config
What defines attributes for a specific view type?
Props
Skin
Style
Theme
Which resource file usually holds color definitions?
paint.xml
themes.xml
styles.xml
colors.xml
Which resource file holds dimension values?
layout.xml
dimens.xml
measures.xml
sizes.xml
Which resource directory targets Spanish locale?
values-esp
values-es
text-es
values-span
Which resource directory targets Night Mode?
values-dark
night-mode
values-night
values-black
What is the primary action button on a screen called?
Hero Button
Main Button
Big Button
Floating Action Button (FAB)
Which component shows a brief message at the bottom?
Snackbar
Alert
Toast
Popup
Which layout manages complex interactions like crumbling headers?
MasterLayout
FrameLayout
MotionLayout
CoordinatorLayout
What component allows text input with a hint?
InputBox
EditText
TextInputLayout
Form
Which component holds content and actions effectively?
Sheet
Box
Card
Panel
What UI element allows navigating 3-5 top destinations?
On Primary
Black
Text Primary
White
Which typography category is for large headings?
Title
Headline
Body
Caption
Which typography category is for standard reading text?
Body
Normal
Para
Content
What allows users to override system text size?
sp units
Magnifier
Zoom
Settings
What does RTL stand for in layout direction?
Right-to-Left
Read-Language
Run-Time-Layout
Return-to-Left
Which theme attribute overrides the action bar color?
colorPrimary
windowBackground
colorSecondary
statusBar
