wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Android Development Multiple Choice Questions

Total questions: 100

Worksheet time: 53mins

Name
Class
Date
1.

What object is used to request an action from another component?

a)

Message

b)

Intent

c)

Packet

d)

Signal

2.

Which Intent type targets a specific app component directly?

a)

Explicit Intent

b)

Direct Intent

c)

Hard Intent

d)

Implicit Intent

3.

Which Intent type asks the system to handle an action?

a)

General Intent

b)

Explicit Intent

c)

Soft Intent

d)

Implicit Intent

4.

What data structure manages the history of visited activities?

a)

Task Queue

b)

History List

c)

Back Stack

d)

App Stack

5.

Which navigation button moves up the app's hierarchy?

a)

Back button

b)

Up button

c)

Home button

d)

Menu button

6.

Which navigation button moves to the previous screen historically?

a)

Recent button

b)

Back button

c)

Exit button

d)

Up button

7.

What represents a reusable portion of UI within an activity?

a)

Fragment

b)

Activity

c)

Intent

d)

Service

8.

Which Jetpack library simplifies app navigation?

a)

Router

b)

Pathfinder

c)

Navigator

d)

Navigation Component

9.

Which XML resource defines all navigation paths?

a)

Path Config

b)

Navigation Graph

c)

Sitemap

d)

Route Map

10.

Which container swaps destinations in the Navigation Component?

a)

NavHost

b)

NavContainer

c)

ScreenFrame

d)

FragmentHolder

11.

Which object manages app navigation within a NavHost?

a)

NavController

b)

NavManager

c)

RouteController

d)

PathGuide

12.

What are individual screens (fragments) called in a NavGraph?

a)

Destinations

b)

Points

c)

Stops

d)

Nodes

13.

What connects two destinations in a NavGraph?

a)

Path

b)

Link

14.

(a) Segment (b) Part (c) Section (d) Fragment

a)

Segment

b)

Part

c)

Section

d)

Fragment

15.

What Gradle plugin ensures type-safe argument passing?

a)

TypeCheck

b)

ArgGuard

c)

IntentSafe

d)

Safe Args

16.

Does a Fragment have its own lifecycle?

a)

No

b)

Only when added

c)

Only in dialogs

d)

Yes

17.

Which Fragment method is used to inflate its layout?

a)

onCreateView()

b)

onCreateLayout()

c)

onInflate()

d)

onViewInit()

18.

Which UI pattern displays a side menu?

a)

Hamburger Menu

b)

Side Bar

c)

Slide Menu

d)

Navigation Drawer

19.

Which layout acts as a container for a Navigation Drawer?

a)

DrawerLayout

b)

MenuLayout

c)

SlidingLayout

d)

SideLayout

20.

What component typically provides the "hamburger" icon?

a)

Status Bar

b)

Action Bar

c)

Toolbar / App Bar

d)

Nav Bar

21.

Which navigation pattern uses a bar at the bottom of the screen?

a)

Bottom Navigation

b)

Tab Bar

c)

Footer

d)

Lower Menu

22.

Which state indicates an Activity is initializing?

a)

Resumed

b)

Active

c)

Started

d)

Created

23.

Which lifecycle method is the first to be called?

a)

onInit()

b)

onResume()

c)

onCreate()

d)

onStart()

24.

In which state is the Activity visible but not interactive?

a)

Resumed

b)

Created

c)

Paused

d)

Started

25.

Which state indicates the Activity has user focus?

a)

Resumed

b)

Active

c)

Running

d)

Started

26.

Which method is called when the Activity is partially obscured?

a)

onPause()

b)

onHide()

c)

onBackground()

d)

onStop()

27.

Which method is called when the Activity is no longer visible?

a)

onPause()

b)

onEnd()

c)

onStop()

d)

onDestroy()

28.

Which method performs final cleanup before destruction?

a)

onDestroy()

b)

onDelete()

c)

onTrash()

d)

onCleanup()

29.

What happens to the Activity when the device is rotated?

a)

It is destroyed and recreated

b)

Nothing happens

c)

It is paused

d)

It is stopped

30.

Which method is used to save UI state before destruction?

a)

persist()

b)

saveState()

c)

onSaveInstanceState()

d)

onBackup()

31.

What object stores the saved state data?

a)

Dictionary

b)

Bundle

c)

Package

d)

Map

32.

Which specific Fragment method is called when associated with context?

a)

onConnect()

b)

onBind()

c)

onAttach()

d)

onLink()

33.

Which specific Fragment method is called when disassociated?

(a)  

34.

Which class allows logging debug messages?

a)

Console

b)

Log

c)

Print

d)

Debug

35.

Which Log method is for informational messages?

a)

Log.e()

b)

Log.v()

c)

Log.i()

d)

Log.d()

36.

Which package provides lifecycle-aware components?

a)

androidx.lifecycle

b)

android.aware

c)

android.life

d)

androidx.component

37.

What interface does an Activity implement to show it has a lifecycle?

a)

LifecycleHolder

b)

LifecycleOwner

c)

Owner

d)

Host

38.

What interface observes lifecycle changes?

a)

LifecycleObserver

b)

Monitor

c)

Listener

d)

Watcher

39.

What is a collection of activities that the user interacts with called?

a)

Process

b)

Task

c)

Group

d)

Job

40.

Does the Back Stack follow LIFO (Last In, First Out)?

a)

FIFO

b)

No

c)

Random

d)

Yes

41.

Which method is called when an Activity starts after being stopped?

a)

onRestart()

b)

onReboot()

c)

onRelapse()

d)

onResume()

42.

What principle suggests dividing code into distinct sections?

a)

Separation of concerns

b)

Don't repeat yourself

c)

Keep it simple

d)

Single responsibility

43.

Which component should handle UI logic and data preparation?

a)

Activity

b)

XML

c)

Fragment

d)

ViewModel

44.

Which component typically displays data but stays passive?

a)

Database

b)

ViewModel

c)

UI Controller (Activity/Fragment)

d)

Repository

45.

Does a ViewModel survive configuration changes like rotation?

a)

No

b)

Yes

c)

Only in background

d)

Only if saved

46.

Which class is used to create or retrieve a ViewModel?

a)

ViewModelFactory

b)

VMCreate

c)

ViewModelProvider

d)

ViewModelBuilder

47.

What is an observable data holder class?

a)

LiveData

b)

Stream

c)

Observable

d)

Flow

48.

Which LiveData subclass allows updating its value?

a)

WriteableLiveData

b)

ChangeableLiveData

c)

DynamicData

d)

MutableLiveData

49.

How do you listen for changes in LiveData?

a)

observe()

b)

watch()

c)

subscribe()

d)

listen()

50.

LiveData is "lifecycle-aware". What does this mean?

a)

Updates only active observers

b)

Updates on background

c)

Does not update

d)

Updates always

51.

What binding syntax is used for two-way data binding?

a)

@{...}

b)

${...}

c)

@={...}

d)

#{...}

52.

Which helper class transforms LiveData values?

(a)  

53.

Which transformation modifies the value itself?

a)

edit()

b)

modify()

c)

map()

d)

change()

54.

Which transformation converts to a new LiveData source?

a)

toggle()

b)

switchMap()

c)

swap()

d)

flatMap()

55.

What is needed to pass arguments to a ViewModel constructor?

a)

Injector

b)

ArgLoader

c)

Builder

d)

ViewModelFactory

56.

Where should UI state be stored to persist across rotation?

a)

Activity

b)

ViewModel

c)

View

d)

Intent

57.

What pattern describes events flowing up and data flowing down?

a)

Bidirectional flow

b)

Circular flow

c)

Unidirectional Data Flow

d)

Linear flow

58.

Why should ViewModel not hold a reference to a View?

a)

To prevent memory leaks

b)

Views are null

c)

It crashes

d)

It is not allowed

59.

Which ViewModel subclass provides access to the Application context?

a)

GlobalViewModel

b)

AndroidViewModel

c)

ContextViewModel

d)

AppViewModel

60.

What Gradle build feature enables Data Binding?

a)

buildFeatures { dataBinding true }

b)

enableDataBinding

c)

useDataBinding

d)

bindingOn

61.

What does the 'Observer' interface require implementing?

a)

onEvent()

b)

onChanged()

c)

onNotify()

d)

onUpdate()

62.

Which storage type is volatile and lost on reboot?

a)

Flash

b)

Disk

c)

SSD

d)

RAM

63.

Which API stores simple key-value pairs?

a)

SQLite

b)

Room

c)

File

d)

SharedPreferences

64.

Which storage option allows saving private files?

a)

Internal Storage

b)

External Storage

65.

Which database engine is built into Android?

a)

MySQL

b)

MongoDB

c)

PostgreSQL

d)

SQLite

66.

Which Jetpack library provides an abstraction over SQLite?

a)

Room

b)

House

c)

Floor

d)

Realm

67.

What represents a table in Room?

a)

Class

b)

Entity

c)

Object

d)

Row

68.

Which annotation marks a class as a Room Entity?

a)

@Table

b)

@Entity

c)

@Database

d)

@Row

69.

What allows accessing the database?

a)

DTO

b)

DAO (Data Access Object)

c)

Service

d)

API

70.

Which annotation marks an interface as a DAO?

a)

@Interface

b)

@Access

c)

@Query

d)

@Dao

71.

Which annotation is used for raw SQL commands?

a)

@SQL

b)

@Raw

c)

@Query

d)

@Command

72.

Which annotations perform modification operations?

a)

@Insert, @Update, @Delete

b)

@Put, @Patch, @Cut

c)

@New, @Change, @Drop

d)

@Add, @Edit, @Remove

73.

Which component serves as the main access point to the DB?

a)

Database

b)

Controller

c)

Manager

d)

Gateway

74.

Which annotation defines the primary key of a table?

a)

@Key

b)

@Id

c)

@PrimaryKey

d)

@Unique

75.

Why should database operations run asynchronously?

a)

Android requires it

b)

To save battery

c)

They are fast

d)

To prevent blocking the main thread

76.

What feature provides lightweight threads for async code?

a)

Processes

b)

Coroutines

c)

Tasks

d)

Threads

77.

Which keyword marks a function that can be paused?

(a)  

78.

Which Dispatcher is optimized for disk/network IO?

a)

Dispatchers.Main

b)

Dispatchers.Default

c)

Dispatchers.IO

d)

Dispatchers.GPU

79.

Which Dispatcher is used for UI updates?

a)

Dispatchers.Background

b)

Dispatchers.IO

c)

Dispatchers.Job

d)

Dispatchers.Main

80.

Which scope launches coroutines tied to a ViewModel?

a)

mainScope

b)

globalScope

c)

lifecycleScope

d)

viewModelScope

81.

What does '@Volatile' ensure for a variable?

a)

Immutability

b)

Security

c)

Visibility changes to other threads

d)

Persistence

82.

Which adapter subclass computes list differences efficiently?

a)

SmartAdapter

b)

ListAdapter

c)

RecyclerAdapter

d)

FastAdapter

83.

Which utility class calculates the difference between two lists?

(a)  

84.

Which callback method checks if two items represent the same object?

a)

equals()

b)

isSame()

c)

compare()

d)

areItemsTheSame()

85.

Which callback method checks if item content matches?

a)

isContentEqual()

b)

match()

c)

check()

d)

areContentsTheSame()

86.

Which method submits a new list to the ListAdapter?

a)

updateList()

b)

push()

c)

submitList()

d)

setList()

87.

What allows creating custom XML attributes for binding?

a)

Custom Views

b)

Attr Setters

c)

XML Hooks

d)

Binding Adapters

88.

Which annotation declares a Binding Adapter?

a)

@Custom

b)

@Bind

c)

@Adapter

d)

@BindingAdapter

89.

Which method returns the view type for a position?

a)

getItemViewType()

b)

getClass()

c)

getView()

d)

getType()

90.

What class type is useful for defining a restricted set of view types?

a)

abstract class

b)

sealed class

c)

interface

d)

open class

91.

Which LayoutManager arranges items in a grid?

a)

MatrixLayout

b)

TableLayout

c)

BoxManager

d)

GridLayoutManager

92.

What parameter determines the number of columns in a grid?

a)

spanCount

b)

size

c)

width

d)

colCount

93.

What class allows dynamic sizing of grid items?

a)

GridHelper

b)

SizeCalc

c)

SpanSizeLookup

d)

SpanManager

94.

How are headers typically handled in a RecyclerView?

a)

Sticky view

b)

Overlay

c)

As a different ViewType

d)

Separate list

95.

Why is ListAdapter better than notifyDataSetChanged?

a)

Better performance with animations

b)

Typesafety

c)

Easier to write

d)

Less code

96.

What method executes generic pending bindings immediately?

4 lines
97.

How can you cache the binding object in a ViewHolder?

a)

In onBind

b)

Static map

c)

Global variable

d)

In the constructor

98.

Where should item click listeners usually be set?

a)

In XML

b)

In onBind

c)

In MainActivity

d)

In the ViewHolder

99.

What allows multiple ViewHolders in one Adapter?

a)

Overloading

b)

Different view types

c)

Generic types

d)

Subclassing

100.

Can a RecyclerView display heterogeneous data?

a)

Yes

b)

Only images

c)

No

d)

Only strings