In an Android app, the Options menu is the menu that appears when you touch the Options icon. The position of the Options icon differs from one Android device to another. In Android 4 or in apps built with the default material design themes, it typically appears in the top right corner.
- [Narrator] So far in this course,…I've focused on how to work with events,…and how to navigate from one activity to the next.…But you also need to provide the end user…with ways to trigger these actions,…and the most common way to do that is with menus.…Our first look at the options menu,…a menu that appears when you touch the options icon.…The position of the options icon differs…from one Android device to another.…In apps built with the default material design themes,…it typically appears in the top right corner.…
You can create a brand new project…that already has an options menu to work with.…I'll create this application…and then I'll name it OptionsMenu.…And just to make sure I'm not creating a whole bunch…of sample apps on my device, I'll use the same package name…as I have previously, of com.example.android.navigation.…And I'll create this in the directory for this video.…I'll choose the basic activity template,…and create the project.…This project already has a menu directory under resources,…and it has this file called menu_main.xml.…
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