Answers to Self-Review Exercises

3.1

a) EditText.

b) GridLayout.

c) Outline.

d) Bundle.

e) TextWatcher.

f) activity.

g) onCreate.

h) R.

i) R.drawable.

j) R.string.

k) findViewById.

3.2

a) True.

b) False. Each component’s layout weight determines how it should be sized relative to other components.

c) False. Android apps don’t have a main method.

d) False. An active (or running) activity is visible on the screen and “has the focus”—that is, it’s in the foreground.

e) False. A stopped activity is not visible on the screen and is likely to be killed by the system when its memory is needed.

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.