You learned abou how to return results from an activity, but so far it only works with the operating system’s back button. You also want to be able handle that operation with the up button that appears on the app's action bar.
- [Instructor] In the previous video I described…how to return results from an activity,…but so far it only works with the…operating system's back button.…If I press the application's up button,…you'll see that the data is not returned,…and you typically want it to work that way.…The thing is, you don't know where the back button…from the operating system's going to be.…On some devices it's one the right,…on some it's on the left,…sometimes it's visible, sometimes it's not.…By making sure you're reacting to functionality…that's completely within your application,…you'll ensure that the user knows…what they're supposed to do.…
So first, I'm going to show you how to change the graphic…that's displayed as a part of this up button.…The button is part of what's called the action bar,…this area at the top of the activity.…And in fact, it's a menu item.…I'll be talking later about how to handle all menu items,…but for now, you just need to know that…when the user touches that back button,…that an event occurs that you can handle and react to.…
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