An activity in an Android application is a basic module with a screen display that supports user interaction, similar to the MIDlet in Java me, and the form in Windows applications. For example, it can be a dial-up, sending a mail UI. Each activity can contain a Windows use to draw the user interface. This Windows proposal occupies the entire screen, but it can also occupy only a portion of the screen or say it is now on the other UI.
An Android application typically consists of multiple activity, with a "master activity" that gives the UI the first display when the user launches the application. The activity can initiate other functions to implement other features. New activity can start new activity again. The UI for the newly initiated activity will overwrite the previous UI. Thus forming a "UI stack". The newly initiated activity will suspend the last activity from running. When the user presses the "Back" button, the "UI stack" is the most activity out of the stack, and the previous UI is displayed again on the screen and resumes the operation of the UI's corresponding activity. This means that Activiy has a "lifecycle".
Writing MIDlet or Windows Mobile Apps is no stranger to the "lifecycle". MIDlet also has a similar life cycle. Windows Form also has events such as load, Unload, and Active. Unlike desktop systems, the life cycle of mobile applications is generally not controlled by the application itself, but by the mobile operating system. The activity accomplishes a function by processing each lifecycle event. For example, call Setcontentview () in the OnCreate () event to set the UI layout. In the OnPause () event to suspend the download, using GPS, etc., in the Onresume () event to restore the download, the return of GPS equipment and so on.
See a full set of tutorials: http://www.bianceng.cn/OS/extra/201301/35252.htm