Menus


Menus

In most applications, menus are used on the UI to provide more navigational options to the users. This makes the user experience consistent, whereas it allows the user to explore the different sections of the application using the menu. In Android, this is done with the help of the menu APIs. The menu APIs handle the user actions and define the behavior of menu options when it is triggered.

In the current Android framework, we don't need a dedicated menu button. This has been there till Android 3.0, but post that this is no more required. There is no six-item based menu panel in the current Android version, as it is used to be in the traditional Android framework. Instead, we have got an App bar that can be used for the most common types of user actions. In this section, we will discuss the variety of menus we will create in Android.

In Android applications, the menus are like this:

  • Android Options Menu: Android Options menu in an Android application is a primary collection of essential menu items for activities that influence the overall program.
  • Android Context Menu: The Android Context Menu is a floating menu that appears when the user hovers their mouse over an element for an extended period. It is helpful for components that affect the selected content or context frame.
  • Android Popup Menu: The Android Popup Menu shows a list of items in a vertical list to the view that prompted the menu, and it's handy for providing an overflow of activities linked to specific content.