Chapter 3. User interfaces
This chapter covers
- Understanding activities and views
- Exploring the Activity lifecycle
- Working with resources
- Exploring the AndroidManifest.xml file
With our introductory tour of the main components of the Android platform and development environment complete, it’s time to look more closely at the fundamental Android concepts surrounding activities, views, and resources. Activities provide screens for your application and play a key role in the Android application lifecycle. The Android framework manages the life span of visible screens, and you’ll learn how to respond to the various lifecycle points you encounter.
The visible part of an Activity consists of subcomponents called views. Views are what your users see and interact with. Views handle layout, provide text elements for labels and feedback, provide buttons and forms for user input, and draw images to the device screen. You can also associate views with interface event listeners, such as those for touch-screen controls. A hierarchical collection of views is used to compose an Activity.