Section 1

Preview this deck

Critical difference between the fragment and activity lifecycles

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (44)

Section 1

(44 cards)

Critical difference between the fragment and activity lifecycles

Front

The fragment life cycle methods are called by the hosting activity, not the OS. The OS knows nothing about the fragment.

Back

What happens when an activity calls startActivity(Intent)

Front

It sends the call to the OS

Back

2 approaches to hosting UI fragments

Front

Add fragment to the activitiys layout. Add the fragment to the activity code.

Back

Fragment

Front

A controller object that an activity can deputize to perform tasks. Most commonly managing a UI (An entire screen or part of one)

Back

Resource

Front

A piece of your application that is not code. Image files, audio files, and XML files.

Back

Four stages of an activity life cycle

Front

Resumed, paused, stopped, and nonexistent

Back

What can widgets do?

Front

Show text or graphics, interact with the user, or arrange other widgets on the screen.

Back

match_parent

Front

View will be as big as its parent

Back

Fragment Manager

Front

Handles a list of fragments and a back stack of fragment transactions.

Back

UI fragment

Front

A fragment managing a UI

Back

Object.GetTextResId()

Front

Gets the resource I'd of whatever object it is on

Back

UUID

Front

A java utility class included in the android framework

Back

Android:id=@+id/ResId

Front

The plus sign is used here and not in android:text because we are creating the Id's and only referencing the strings.

Back

ViewGroup

Front

A widget that contains and arranges other widgets.

Back

XML Attributes

Front

An instruction about how to widgets should be configured.

Back

setOnClickListener(OnClickListener)

Front

Takes a listener as it's argument

Back

OnSacedOnstanceState()

Front

Is called before onStop() except when the user presses the back button

Back

Manifest

Front

An XML file containing Metadata that describes your application to the Android OS

Back

Widget

Front

Building blocks used to compose a UI.

Back

UUID. randomUUID()

Front

Generates a random and unique id

Back

Why should a fragment reflect its activitiys state

Front

A fragment works on behalf of an activity

Back

@Override

Front

This annotation is used to instruct compiler that method annotated with _________ is an overridden method from super class or interface

Back

Container view

Front

A place in the view where the fragment will appear. Is often generic so we can place many different fragments there.

Back

Intent

Front

An object that a component can use to communicate with the OS. They are multipurpose communication tools.

Back

Strings resource

Front

A string that lives in a separate XML file called a strings file

Back

What is a Bundle object

Front

A structure that maps string keys to values of certain limited types

Back

Object.isAnswerTrue()

Front

Checks to see

Back

What is the simplest way an activity can start abother

Front

The startActivity method

Back

android:orientation

Front

Determines whether a widget will be vertical or horizantal

Back

Wrap_content

Front

View will be as big as its contents require

Back

onCreate(Bundle)

Front

Called when an instance of the activity subclass is created

Back

AppCompatActivity

Front

A subclass of androids activity class that provides compatibility support for older versions of android

Back

What happens to the activity when the user presses the back button?

Front

Android wipes the activity completely from memory and makes no attempt to save it.

Back

Implicit intents

Front

Starts an activity in another application

Back

Rotating a device

Front

Changes the device configuration

Back

Native implementation of fragments

Front

Built into the device the user runs the app on

Back

Intent.putExtra(string s, boolean value)

Front

How how to pass values with inte ts

Back

How do you access a resource in your code?

Front

You use its resource ID

Back

Explicit intents

Front

Start activities within your application

Back

layout

Front

A resource

Back

Support implementation of fragments

Front

Built into a library that you include in your application

Back

When do you call activity life cycle methods

Front

NEVER. Android calls them when needed.

Back

How to assign a button to a button variable

Front

buttonName = (button) findViewById(R.id.resId)

Back

What part of the OS creates the activity instance and calls it's onCreate bundle?

Front

ActivityManager

Back