wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Lesson 4-8

Total questions: 91

Worksheet time: 46mins

Name
Class
Date
1.

What is the official IDE for Android development?

a)

Android Studio

b)

VS Code

c)

IntelliJ IDEA

d)

Eclipse

2.

Which build system does Android Studio use?

a)

Gradle

b)

Maven

c)

Make

d)

Ant

3.

Which file contains the build configuration for a module?

a)

config.xml

b)

build.gradle

c)

settings.json

d)

make.file

4.

Which file describes essential information like package name app components?

a)

AndroidManifest.xml

b)

strings.xml

c)

MainActivity.kt

d)

Layout.xml

5.

Which component represents a single screen with a user interface?

a)

Provider

b)

Receiver

c)

Activity

d)

Service

6.

Which lifecycle method is called when an Activity is first created?

a)

onInit()

b)

onStart()

c)

onCreate()

d)

onResume()

7.

Which method is used to inflate a layout resource in an Activity?

a)

setContentView()

b)

inflate()

c)

setLayout()

d)

drawLayout()

8.

What are UI building blocks like Buttons and TextViews called?

a)

Tags

b)

Views

c)

Widgets

d)

Elements

9.

What is a View that contains other Views called?

a)

Wrapper

b)

Container

c)

Holder

d)

ViewGroup

10.

Which directory holds non-code assets like images and XML?

a)

bin

b)

res

c)

src

d)

assets

11.

Which generated class references all resources by ID?

a)

Id

b)

R

c)

Config

d)

Res

12.

Where are string resources typically defined?

a)

res/values/strings.xml

b)

AndroidManifest.xml

c)

src/main/strings.kt

d)

res/layout/text.xml

13.

What tool allows visual design of UI layouts?

a)

Layout Editor

b)

View Builder

c)

UI Designer

d)

Interface Maker

14.

What software simulates an Android device on your computer?

a)

Emulator

b)

Simulator

c)

VirtualBox

d)

Docker

15.

Which window displays system logs and app messages?

a)

Console

b)

Terminal

c)

Logcat

d)

Debug

16.

What unit is recommended for layout dimensions?

a)

dp

b)

in

c)

mm

d)

px

17.

What unit is recommended for text size?

a)

px

b)

sp

c)

dp

d)

pt

18.

What are properties like 'android:text' in XML called?

a)

Settings

b)

Parameters

c)

Attributes

d)

Fields

19.

What library binds UI components in layouts to data sources?

a)

Event Binding

b)

Model Binding

c)

Data Binding

d)

View Binding

20.

What is the root tag for a layout using data binding?

a)

<root>

b)

<binding>

c)

<layout>

d)

<data>

21.

What syntax is used for a binding expression in XML?

a)

${...}

b)

{{...}}

c)

@{...}

d)

#{...}

22.

Data binding largely eliminates the need for which call?

a)

startActivity()

b)

onCreate()

c)

findViewById()

d)

setContentView()

23.

Which widget is efficient for displaying large lists?

a)

ScrollView

b)

GridView

c)

RecyclerView

d)

ListView

24.

Which class adapts a data set to be displayed in a RecyclerView?

a)

Presenter

b)

Manager

c)

Adapter

d)

Controller

25.

Which object holds references to views for a single list item?

a)

ItemHolder

b)

ViewHolder

c)

ViewContainer

d)

RowView

26.

Which component positions items in a RecyclerView?

a)

PositionManager

b)

LayoutManager

c)

ItemLayer

d)

GridManager

27.

Which adapter method creates a new ViewHolder?

a)

createRow()

b)

newViewHolder()

c)

onCreateViewHolder()

d)

makeHolder()

28.

Which adapter method binds data to a ViewHolder?

a)

onBindViewHolder()

b)

fillView()

c)

setData()

d)

bindRow()

29.

Which adapter method returns the total number of items?

a)

getItemCount()

b)

count()

c)

length()

d)

getSize()

30.

What process allows reusing views that scroll off-screen?

a)

Recycling

b)

Caching

c)

Destroying

d)

Hiding

31.

What is the space *outside* a view’s boundary called?

a)

Border

b)

Padding

c)

Spacing

d)

Margin

32.

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

a)

Message

b)

Intent

c)

Packet

d)

Signal

33.

Which Intent type targets a specific app component directly?

a)

Explicit Intent

b)

Direct Intent

c)

Hard Intent

d)

Implicit Intent

34.

Which Intent type asks the system to handle an action?

a)

General Intent

b)

Explicit Intent

c)

Soft Intent

d)

Implicit Intent

35.

What data structure manages the history of visited activities?

a)

Task Queue

b)

History List

c)

Back Stack

d)

App Stack

36.

Which navigation button moves up the app’s hierarchy?

a)

Back button

b)

Up button

c)

Home button

d)

Menu button

37.

Which navigation button moves to the previous screen historically?

a)

Recent button

b)

Back button

c)

Exit button

d)

Up button

38.

What represents a reusable portion of UI within an activity?

a)

Segment

b)

Part

c)

Section

d)

Fragment

39.

Which Jetpack library simplifies app navigation?

a)

Router

b)

Pathfinder

c)

Navigator

d)

Navigation Component

40.

Which XML resource defines all navigation paths?

a)

Path Config

b)

Navigation Graph

c)

Sitemap

d)

Route Map

41.

Which container swaps destinations in the Navigation Component?

a)

NavHost

b)

NavContainer

c)

ScreenFrame

d)

FragmentHolder

42.

Which object manages app navigation within a NavHost?

a)

NavController

b)

NavManager

c)

RouteController

d)

PathGuide

43.

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

a)

Destinations

b)

Points

c)

Stops

d)

Nodes

44.

What connects two destinations in a NavGraph?

a)

Path

b)

Link

c)

Edge

d)

Action

45.

What Gradle plugin ensures type-safe argument passing?

a)

TypeCheck

b)

ArgGuard

c)

IntentSafe

d)

Safe Args

46.

Does a Fragment have its own lifecycle?

a)

No

b)

Only when added

c)

Only in dialogs

d)

Yes

47.

Which Fragment method is used to inflate its layout?

a)

onCreateView()

b)

onCreateLayout()

c)

onInflate()

d)

onViewInit()

48.

Which UI pattern displays a side menu?

a)

Hamburger Menu

b)

Side Bar

c)

Slide Menu

d)

Navigation Drawer

49.

Which layout acts as a container for a Navigation Drawer?

a)

DrawerLayout

b)

MenuLayout

c)

SlidingLayout

d)

SideLayout

50.

What component typically provides the 'hamburger' icon?

a)

Status Bar

b)

Action Bar

c)

Toolbar / App Bar

d)

Nav Bar

51.

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

a)

Bottom Navigation

b)

Tab Bar

c)

Footer

d)

Lower Menu

52.

Which state indicates an Activity is initializing?

a)

Resumed

b)

Active

c)

Started

d)

Created

53.

Which lifecycle method is the first to be called?

a)

onInit()

b)

onResume()

c)

onCreate()

d)

onStart()

54.

In which state is the Activity visible but not interactive?

a)

Resumed

b)

Created

c)

Paused

d)

Started

55.

Which state indicates the Activity has user focus?

a)

Resumed

b)

Active

c)

Running

d)

Started

56.

Which method is called when the Activity is partially obscured?

a)

onPause()

b)

onHide()

c)

onBackground()

d)

onStop()

57.

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

a)

onPause()

b)

onEnd()

c)

onStop()

d)

onDestroy()

58.

Which method performs final cleanup before destruction?

a)

onDestroy()

b)

onDelete()

c)

onTrash()

d)

onCleanup()

59.

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

60.

Which method is used to save UI state before destruction?

a)

persist()

b)

saveState()

c)

onSaveInstanceState()

d)

onBackup()

61.

What object stores the saved state data?

a)

Dictionary

b)

Bundle

c)

Package

d)

Map

62.

Which specific Fragment method is called when associated with context?

a)

onConnect()

b)

onBind()

c)

onAttach()

d)

onLink()

63.

Which specific Fragment method is called when disassociated?

a)

onUnlink()

b)

onRelease()

c)

onDisconnect()

d)

onDetach()

64.

Which class allows logging debug messages?

a)

Console

b)

Log

c)

Print

d)

Debug

65.

Which Log method is for informational messages?

a)

Log.e()

b)

Log.v()

c)

Log.i()

d)

Log.d()

66.

Which package provides lifecycle-aware components?

a)

androidx.lifecycle

b)

android.aware

c)

android.life

d)

androidx.component

67.

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

a)

LifecycleHolder

b)

LifecycleOwner

c)

Owner

d)

Host

68.

What interface observes lifecycle changes?

a)

LifecycleObserver

b)

Monitor

c)

Listener

d)

Watcher

69.

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

a)

Process

b)

Task

c)

Group

d)

Job

70.

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

a)

FIFO

b)

No

c)

Random

d)

Yes

71.

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

a)

onRestart()

b)

onReboot()

c)

onRelapse()

d)

onResume()

72.

What principle suggests dividing code into distinct sections?

a)

Separation of concerns

b)

Don’t repeat yourself

c)

Keep it simple

d)

Single responsibility

73.

Which component should handle UI logic and data preparation?

a)

Activity

b)

XML

c)

Fragment

d)

ViewModel

74.

Which component typically displays data but stays passive?

a)

Database

b)

ViewModel

c)

UI Controller (Activity/Fragment)

d)

Repository

75.

Does a ViewModel survive configuration changes like rotation?

a)

No

b)

Yes

c)

Only in background

d)

Only if saved

76.

Which class is used to create or retrieve a ViewModel?

a)

ViewModelFactory

b)

VMCreate

c)

ViewModelProvider

d)

ViewModelBuilder

77.

What is an observable data holder class?

a)

LiveData

b)

Stream

c)

Observable

d)

Flow

78.

Which LiveData subclass allows updating its value?

a)

WriteableLiveData

b)

ChangeableLiveData

c)

DynamicData

d)

MutableLiveData

79.

How do you listen for changes in LiveData?

a)

observe()

b)

watch()

c)

subscribe()

d)

listen()

80.

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

a)

Updates only active observers

b)

Updates on background

c)

Does not update

d)

Updates always

81.

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

a)

@{...}

b)

${...}

c)

@={...}

d)

#{...}

82.

Which helper class transforms LiveData values?

a)

Mappers

b)

Converters

c)

Transformations

d)

Changers

83.

Which transformation modifies the value itself?

a)

edit()

b)

modify()

c)

map()

d)

change()

84.

Which transformation converts to a new LiveData source?

a)

toggle()

b)

switchMap()

c)

swap()

d)

flatMap()

85.

What is needed to pass arguments to a ViewModel constructor?

a)

Injector

b)

ArgLoader

c)

Builder

d)

ViewModelFactory

86.

Where should UI state be stored to persist across rotation?

a)

Activity

b)

ViewModel

c)

View

d)

Intent

87.

What pattern describes events flowing up and data flowing down?

a)

Bidirectional flow

b)

Circular flow

c)

Unidirectional Data Flow

d)

Linear flow

88.

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

89.

Which ViewModel subclass provides access to the Application context?

a)

GlobalViewModel

b)

AndroidViewModel

c)

ContextViewModel

d)

AppViewModel

90.

What Gradle build feature enables Data Binding?

a)

buildFeatures { dataBinding true }

b)

enableDataBinding

c)

useDataBinding

d)

bindingOn

91.

What does the 'Observer' interface require implementing?

a)

onEvent()

b)

onChanged()

c)

onNotify()

d)

onUpdate()