Chapter 7 Flashcards

1
Q

fragment

A

controller object that an activity can deputize to perform tasks. Most commonly, the task is managing a user interface. The UI can be an entire screen or one part of the screen.

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

UI fragment

A

fragment managing a user interface. UI fragments has a view of its own that is inflated from a layout file.

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

UI fragments separates the UI of your app into building blocks (t/f)

A

True

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

cost of UI fragments

A

more complexity, more moving parts, and more code

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

support library

A

includes Fragment class that you can use on any Android device running API level 4 or higher. Allows backwards-compatibility to be relatively painless.

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

for compatibility with lower API levels, you subclass FragmentActivity instead of just Fragment class. (t/f)

A

True

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

To host a UI fragment

A

Activity must :
define a spot in its layout for the fragments view;
manage the lifecycle of the fragment instance.

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

difference between fragment lifecycle and activity lifecycle

A

fragment lifecycle methods are called by the hosting activity, not the OS. OS knows nothing about the fragments that an activity is using to manage things.

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