MIDTERM | Activities and Intents | MST

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

1/41

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:39 AM on 3/23/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

42 Terms

1
New cards

Activity

represents a single screen in the app where the user can perform a single focused task such as sending an e-mail. It is usually presented to the user as a full-screen window.

2
New cards

Activity

To implement an activity: 1. Create an __________ Java class.

3
New cards

XML layout

To implement an activity: 2. Implement a basic UI for the Activity in an associated ____ _________ file.

4
New cards

AndroidManifest

To implement an activity: 3. Declare the new Activity in ______________.xml

5
New cards

Main activity (MainActivity.java)

It is presented to the user when the app is launched.

6
New cards

Activities

Main activity (MainActivity.java) can then start other ___________ to perform different actions.

7
New cards

Activity life cycle

It is the set of states an activity can be in during its entire lifetime.

8
New cards

onCreate()

It is invoked when the app is launched for the first time. It happens only once for the entire life of the activity.

9
New cards

onStart()

It is invoked before the activity becomes visible to the user.

10
New cards

onResume() or onStop()

onStart() is followed by either: _____________ or ____________

11
New cards

onResume()

onStart() is followed by either: • ___________ – if the activity comes to the foreground

12
New cards

onStop()

onStart() is followed by either: • ___________ – if the activity becomes hidden

13
New cards

onResume()

It is invoked before the activity starts interacting with the user.

14
New cards

onPause()

It is invoked when the system is about to start resuming another activity.

15
New cards

onResume() or onStop()

onPause() is followed by either: ___________ or ___________

16
New cards

onResume()

onPause() is followed by either: • ____________ – if the activity returns to the background

17
New cards

onStop()

onPause() is followed by either: • __________ – if the activity becomes invisible to the user

18
New cards

onStop()

It is invoked when the activity is no longer visible to the user.

19
New cards

onRestart()

onStop() is followed by either: • __________ – if the activity is coming back to interact with the user

20
New cards

onDestroy()

onStop() is followed by either: • ___________ – if the activity is about to end

21
New cards

onDestroy()

It is invoked when: • the activity is finishing (due to the user completely dismissing the activity or due to finish() being called on the activity)

22
New cards

configuration change

onDestroy() is invoked when: • the system is temporarily destroying the activity due to a ___________ ________ (such as device rotation or multi-window mode)

23
New cards

onRestart()

It is invoked if the activity comes back after being stopped.

24
New cards

onStart()

onRestart() is always followed by ______________.

25
New cards

back stack

Each time a new activity starts, the previous activity is stopped, but the system preserves the activity in a stack called the __________ __________.

26
New cards

Intent

An activity is started or activated with an ________.

27
New cards

Intent

It is an asynchronous message that is used in an activity to request an action from another activity, or from some other app component.

28
New cards

Start

An intent can be used to ________ one activity from another activity, and to pass data between activities.

29
New cards

Target activity

the activity that will receive the intent.

30
New cards

Intent data/object

contains a reference to the data you want the receiving activity to operate on.

31
New cards

Intent extras

carry information the receiving activity requires to accomplish the requested action (optional).

32
New cards

Intent flags

may instruct the Android system how to launch an Activity or how to treat it after it's launched (optional).

33
New cards

Target Activity, Intent Data/Object, Intent Extras, Intent Flags

Parts of an Intent: HINT: TA ID/O IE IF

34
New cards

Explicit intent

The target of the intent (the class name of the activity) is already identified.

35
New cards

Implicit intent

The target of the intent is not yet identified but there is a general action to perform.

36
New cards

action, category, and data type

Implicit intent also includes an ________, ____________, and _______ ______.

37
New cards

parentActivityName

This attribute indicates that the main activity is the parent of the second activity. Arrow

38
New cards

onClick

To add an intent after creating a new activity: 2. Add the android:________ attribute to the Button element that will be used to start another activity.

39
New cards

Method

To add an intent after creating a new activity: 3. Define the _________ that will be used to start another activity.

40
New cards

Explicit

The intent added is an _________ intent because the receiving activity is specified (Main2Activity).

41
New cards

Current

The this keyword represents the _______ activity

42
New cards

Toast

To verify if the intent works, add a _______ to Main2Activity.

Explore top notes

note
Chapter 2 - The Role of Prices
Updated 1134d ago
0.0(0)
note
7.2 Transcription
Updated 1153d ago
0.0(0)
note
Unit 2
Updated 692d ago
0.0(0)
note
Untitled
Updated 1069d ago
0.0(0)
note
Unit One Booklet 4
Updated 513d ago
0.0(0)
note
UO6 and UO7
Updated 1028d ago
0.0(0)
note
Chapter 2 - The Role of Prices
Updated 1134d ago
0.0(0)
note
7.2 Transcription
Updated 1153d ago
0.0(0)
note
Unit 2
Updated 692d ago
0.0(0)
note
Untitled
Updated 1069d ago
0.0(0)
note
Unit One Booklet 4
Updated 513d ago
0.0(0)
note
UO6 and UO7
Updated 1028d ago
0.0(0)

Explore top flashcards

flashcards
periodic table 52 elements
52
Updated 919d ago
0.0(0)
flashcards
War horse ch.1-8
24
Updated 443d ago
0.0(0)
flashcards
Edexcel IGCSE History, USA
124
Updated 802d ago
0.0(0)
flashcards
theology final
100
Updated 299d ago
0.0(0)
flashcards
La Comida vocab, parte 2
33
Updated 213d ago
0.0(0)
flashcards
climate change
55
Updated 1211d ago
0.0(0)
flashcards
periodic table 52 elements
52
Updated 919d ago
0.0(0)
flashcards
War horse ch.1-8
24
Updated 443d ago
0.0(0)
flashcards
Edexcel IGCSE History, USA
124
Updated 802d ago
0.0(0)
flashcards
theology final
100
Updated 299d ago
0.0(0)
flashcards
La Comida vocab, parte 2
33
Updated 213d ago
0.0(0)
flashcards
climate change
55
Updated 1211d ago
0.0(0)