SA2 Reviewer - CS0011

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/26

encourage image

There's no tags or description

Looks like no tags are added yet.

27 Terms

1
New cards

How do you start a new Activity using an Intent?

startService(intent)

startContent(intent)

startBroadcast(intent)

startActivity(intent)

startActivity(intent)

2
New cards

We can not instantiate UI elements during runtime.

True

False

False

3
New cards

View is something that the user can see and interact with.

True

False

True

4
New cards

What are the main types of Intents?

Internal and External

Direct and Indirect

Static and Dynamic

Correct answer:

Explicit and Implicit

Explicit and Implicit

5
New cards

An app is running in the foreground when a phone call arrives, displaying a small dialog-themed incoming call window over the top of the app. The user can still see the app's UI partially blurred or obscured in the background. Which lifecycle method is called on the main activity when this dialog appears?

onDestroy()

onStop()

onSaveInstanceState()

onPause()

onPause()

6
New cards

Activity class takes care of creating a window for you in which you can place your UI with setContentView(View)

True

False

True

7
New cards

Activity is one of the most important component for any android app. Activities are the User Interface (UI) screens which user see.

True

False

True

8
New cards

We can use the Intent.getExtras() in the target activity/class to get the attached bundle and extract the data stored in it.

True

False

True

9
New cards

Linear layout is an example of ______________.

Layout Attributes

ViewGroup

Controls

View

ViewGroup

10
New cards

The onClickListener is an event handler.

True

False

False

11
New cards

Intent can be use to launch an activity.

True

False

True

12
New cards

When you switch from one activity to another, the first activity will no longer be visible on your screen, in this case, the callback method ___________ is called.

onPause()

onResume()

onDestroy()

onStop()

onStop()

13
New cards

An app is running in the foreground when a phone call arrives, displaying a small dialog-themed incoming call window over the top of the app. The user can still see the app's UI partially blurred or obscured in the background. Which lifecycle method is called on the main activity when this dialog appears?

onPause()

onDestroy()

onSaveInstanceState()

onStop()

onPause()*

14
New cards

The onResume() callback method is called whenever the activity becomes visible to the user.

True

False

True*

15
New cards

When the user exits an application, which of the following is correct?

  1. onStop() will be called first before onDestroy()

  2. onDestroy() will be called first before onStop()

  3. the application will only call onStop()

  4. the application will only call onDestroy()

i

iv only

ii only

ii and iii

i*

16
New cards

This is the last callback method in Android’s activity life cycle.

onRestart()

onStop()

onDestroy()

onResume()

onDestroy()*

17
New cards

When you open an application, onResume() method is called after.

onCreate()

onStop()

onPause()

onStart()

onStart()*

18
New cards

TextView is an example of ________.

Event

View

ViewGroup

Resource ID

View

19
New cards

An individual UI component generally referred to as a "widget".

Layout

View

Resource

ViewGroup

View

20
New cards

The onClickListener is called when the user either clicks or touches or focuses upon any widget like button, text, image etc.

True

False

False

21
New cards

In Android, layouts are typically defined in JSON file format.

True

False

False

22
New cards

What is a layout in Android?

A resource file for app strings

A class for managing events

A background image for an Activity

A container that defines the structure of a user interface

A container that defines the structure of a user interface

23
New cards

We can use the Intent.getExtras() in the target activity/class to get the attached bundle and extract the data stored in it.

True

False

True

24
New cards

What is the purpose of getIntent() in an Activity?

To send a result back to the caller

To return the Intent that started the Activity

To create a new Intent

To destroy the current Intent

To return the Intent that started the Activity

25
New cards

Implicit intents do not name a specific component, but instead declare a general action to perform, which allows a component from another app to handle it.

True

False

True

26
New cards

What are the main types of Intents?

Explicit and Implicit

Direct and Indirect

Static and Dynamic

Internal and External

Explicit and Implicit

27
New cards

How do you start a new Activity using an Intent?

startBroadcast(intent)

startService(intent)

startActivity(intent)

startContent(intent)

startActivity(intent)