MODULE 4 Flashcards

1
Q

Lifecycle:

A

The way Android apps interact with Android OS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

_____ help with knowing where to put java code depending on the objective

A

Phases of the lifecycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Android applications start with _____

A

a series of callback methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Activity:

A

A screen of an app’s interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

_____ decides how an app is viewed by a user

A

Current phase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Android lifecycle phases:

A
  • Being created
  • Starting
  • Resuming
  • Running
  • Pausing
  • Stopping
  • Being destroyed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

onResume:

A

Reloads saved data from when the app was interrupted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

onCreate:

A

Declares the UI to setContentView, graphics, and sound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

onStart:

A

Makes the activity visible and initializes the code that maintains the UI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

onPause:

A

Saves data when device goes to sleep or user about to switch to another app

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

onStop:

A

Releases resources when another app is started

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

onDestroy:

A

Removes app from memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Solution to lifecycle method complexity:

A
  1. Set up app in onCreate
  2. Load data in onResume
  3. Save data in onPause
  4. Tidy up app in onDestroy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

_____ Loads the menu from menu_main.xml

A

onCreateOptionsMenu

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

_____ Directs execution to item selected

A

onOptionsItemSelected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Structure of Java code:

A
  • Package
  • Classes
  • Methods
16
Q

_____ is a container for user defined code

A

Package

17
Q

_____ are the building blocks of code

A

Classes

18
Q

_____ wrap functional code

A

Methods

19
Q

_____ handle navigation between screens

A

Fragments

20
Q

_____ are sub-activities

A

Fragments

21
Q

_____ are multiple screens in an activity

A

Fragments