In Chapter 1, “Getting Started” you learned to write a simple Android application. It is now time to delve deeper into the art and science of Android application development. This chapter discusses one of the most important component types in Android programming, the activity.
The Activity Lifecycle
The first application component that you need to get familiar with is the activity. An activity is a window containing user interface (UI) components that the user can interact with. Starting an activity often means displaying a window.
An activity is an instance of the android.app.Activity class. A typical Android application starts by starting an activity, which, as I said, loosely means showing a window. The first window that ...