Activities in Android go through a life cycle, a series of states as they appear and disappear on the device. Activities are grouped into tasks. The task's activities are managed on a last-in-first-out basis, meaning that when the user presses a back button the current activity will be removed, and the previous activity will be displayed.
- [Instructor] Activities in Android go through a lifecycle,…a series of states as they appear…and disappear on the device.…Activities are grouped into tasks.…The task's activities are managed…on a last in, first out basis…meaning that when the user presses a Back button,…the current activity will be removed,…and the previous activity will be displayed.…Typically, all of the activities of a single app…are in the same task.…For example, when you first open an app,…its main activity, marked as the launch activity…in the application manifest, is displayed.…
That activity is part of a task.…If the app launches a second activity,…the first activity is added to a queue…known as the back stack.…And the second activity is now on the top of the stack.…If the user were then to press the device's Back button,…or the application finished the second activity,…that would remove the second activity from the stack,…and the first activity would come to the foreground.…Now, take a scenario where the user…presses the Home button on the device,…
David also shows how to send and receive broadcast messages that let you exchange data and notifications among the different tiers of your application. He demonstrates how to work with menus and the action bar, add a navigation drawer to a layout, and tackle advanced navigation techniques. Later courses in the Essentials series concentrate on other specific skills you can master.
- Working with events
- Handling events with Java objects and lambda expressions
- Managing navigation
- Sending data to an activity
- Opening other apps with implicit intents
- Sending and receiving broadcast messages
- Working with menus and the action bar
- Adding a navigation drawer
- Advanced navigation techniques
- Removing activities from the back stack