MOBILE PROGRAMMING (MIDTERM)

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

1/59

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:37 PM on 3/20/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

60 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
term image

Create an Activity Java class.

3
New cards

main activity

is presented to the user when the app is launched. It can then start other activities to perform different actions.

4
New cards

activity life cycle

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

5
New cards

actvity life cycle

knowt flashcard image
6
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.

7
New cards

onStart()

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

8
New cards

onResume() onStart()

if the activity comes to the foreground

9
New cards

onStop() onStart()

if the activity becomes hidden

10
New cards

onResume()

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

11
New cards

onPause()

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

12
New cards

onResume() onPause()

if the activity returns to the background

13
New cards

onStop() onPause()

if the activity becomes invisible to the user

14
New cards

onStop()

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

15
New cards

onRestart() onStop()

if the activity is coming back to interact with the user

16
New cards

onDestroy() onStop()

if the activity is about to end

17
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)

  • the system is temporarily destroying

    the activity due to a configuration

    change (such as device rotation or

    multi-window mode)

18
New cards

onRestart()

It is invoked if the activity comes back after being stopped. It is always followed by onStart().

19
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

20
New cards

Intent

An activity is started or activated with an ______. An ______is an asynchronous message that is used in an activity to request an action from another activity, or from some other app component.

  • can be used to start one activity from another activity, and to pass data between activities.

21
New cards

Target activity

the activity that will receive the intent.

22
New cards

Intent data/object

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

23
New cards

Intent extras

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

24
New cards

Intent flags

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

25
New cards

Explicit intent:

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

26
New cards

Implicit intent:

The target of the intent is not yet identified but there is a general action to perform. It also includes an action, category, and data type.

27
New cards

<activity> elements in the AndroidManifest.xml

knowt flashcard image
28
New cards

parentActivityName

attribute indicates that the main activity is the parent of the second activity. This enables a left-facing arrow that allows the user to navigate from the current activity to its parent activity.

29
New cards
<p></p>

Add the android:onClick attribute to the Button element that will be used to start another activity.

30
New cards
<p></p>

Define the method that will be used to start another activity.

31
New cards
term image

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

32
New cards

layout

defines the structure for an app's user interface.

33
New cards
  • View (widget)

  • ViewGroup (layout)

All elements in the layout are built using:

34
New cards

View (widget)

draws something the user can see and interact with

35
New cards

ViewGroup (layout)

an invisible container that defines the layout structure for View and other ViewGroup objects

36
New cards

Declare UI elements in XML.

The presentation of the app can be separated from the code that controls its behavior.

37
New cards

Instantiate layout elements at runtime.

The View and ViewGroup objects can be created and their properties can be manipulated programmatically.

38
New cards
term image

Define a view/widget in the layout file and assign it a unique ID.

39
New cards
term image

Create an instance of the view object and capture it from the layout (typically in the onCreate() method)

40
New cards
term image

To manipulate the property of a widget in Java code:

41
New cards

Context

is an interface to global information about an application environment.

42
New cards
  • width (layout_width)

  • height (layout_height)

All view groups include a _________ and _________, and each view is required to define them.

43
New cards

wrap_content

sets the size of the view to the dimensions required by its content.

44
New cards

match_parent

sets the view to be as big as its parent view group will allow.

45
New cards

Constraint Layout

creates large and complex layouts with a flat view hierarchy (no nested view groups).

46
New cards

Linear Layout

organizes its child view elements into a single horizontal or vertical row.

47
New cards

Relative Layout

is used to specify the location of child objects relative to each other (child A to the left of child B) or to the parent (aligned to the top of the parent).

48
New cards

Web View

is used for displaying web pages.

49
New cards

Frame Layout

is designed to block out an area on the screen to display a single item.

50
New cards

Table Layout

arranges its child objects into rows and columns.

51
New cards

Grid Layout

arranges its child objects in a rectangular grid that can be scrolled.

52
New cards
term image

To create a layout in XML:

53
New cards
term image

To create a layout in Java code:

54
New cards

notification

is a message that Android displays outside the app's UI to provide the user with reminders, communication from other people, or other timely information from the app.

<p>is a message that Android displays outside the app's UI to provide the user with reminders, communication from other people, or other timely information from the app.</p>
55
New cards

notification drawer

allows to view more details and take actions with the notification.

56
New cards

app bar/action bar

provides a visual structure and interactive elements that are familiar to users.

Its key features are:

  • A dedicated space for giving the app an identity and indicating the user's location in the app

  • Access to important actions in a predictable way, such as search

  • Support for navigation and view switching (with tabs or drop-down lists)

<p>provides a visual structure and interactive elements that are familiar to users.</p><p></p><p>Its key features are:</p><ul><li><p>A dedicated space for giving the app an identity and indicating the user's location in the app</p></li><li><p>Access to important actions in a predictable way, such as search</p></li><li><p>Support for navigation and view switching (with tabs or drop-down lists)</p></li></ul><p></p>
57
New cards

toast

provides simple feedback about an operation in a small popup.

<p>provides simple feedback about an operation in a small popup.</p>
58
New cards

Snackbar

provides a quick pop-up message to the user.

<p>provides a quick pop-up message to the user.</p>
59
New cards

dialog

is a small window that prompts the user to make a decision or enter additional information. It is not designed to fill the screen.

<p>is a small window that prompts the user to make a decision or enter additional information. It is not designed to fill the screen.</p>
60
New cards

menu

is used to present user actions and other options in the app's activities.

<p>is used to present user actions and other options in the app's activities.</p>

Explore top notes

note
WHAP - Unit 2 Review
Updated 528d ago
0.0(0)
note
2.1 Physical and Mental Health
Updated 1102d ago
0.0(0)
note
THE NEW NATION
Updated 633d ago
0.0(0)
note
Chapter 13 - Chemical Equilibrium
Updated 1437d ago
0.0(0)
note
WHAP - Unit 2 Review
Updated 528d ago
0.0(0)
note
2.1 Physical and Mental Health
Updated 1102d ago
0.0(0)
note
THE NEW NATION
Updated 633d ago
0.0(0)
note
Chapter 13 - Chemical Equilibrium
Updated 1437d ago
0.0(0)

Explore top flashcards

flashcards
cogni
400
Updated 783d ago
0.0(0)
flashcards
Latin Exam Vocabulary
437
Updated 309d ago
0.0(0)
flashcards
[ 2MID ] MIL - What is Media?
40
Updated 207d ago
0.0(0)
flashcards
LV - Python
20
Updated 1040d ago
0.0(0)
flashcards
Unit 2: Cognition
50
Updated 9d ago
0.0(0)
flashcards
unit 2 vocab
140
Updated 1183d ago
0.0(0)
flashcards
cogni
400
Updated 783d ago
0.0(0)
flashcards
Latin Exam Vocabulary
437
Updated 309d ago
0.0(0)
flashcards
[ 2MID ] MIL - What is Media?
40
Updated 207d ago
0.0(0)
flashcards
LV - Python
20
Updated 1040d ago
0.0(0)
flashcards
Unit 2: Cognition
50
Updated 9d ago
0.0(0)
flashcards
unit 2 vocab
140
Updated 1183d ago
0.0(0)