Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Context menu vs Popup menu vs bottom sheet?

Tags:

android

What are the differences between Context menu vs Popup menu vs bottom sheet? and what kind of situations they are best fit for?

like image 862
Shane Ekanayake Avatar asked Aug 13 '15 06:08

Shane Ekanayake


People also ask

What is the difference between popup menu and context menu?

The contextual action mode displays action items that affect the selected content in a bar at the top of the screen and allows the user to select multiple items. See the section about Creating Contextual Menus. A popup menu displays a list of items in a vertical list that's anchored to the view that invoked the menu.

What is the difference between a contextual menu and an options menu?

Context Menu - the menu shown when you press and hold an item. Show activity on this post. Google provides an extensive summary of the different menu types in their documentation. The options menu is the primary collection of menu items for an activity.

What are the two types of popup menus?

There are three types of menus in Android: Popup, Contextual and Options. Each one has a specific use case and code that goes along with it.

What is the difference between drop down menu and pop-up menu?

Popup menu refers to the menu that can be displayed anywhere on the page by right clicking on the mouse anywhere on the page whereas a drop down menu refers to a menu that comes down from the menu bar when clicked and keeps remaining open until closed by the user.


2 Answers

Option Menu Option Menus are the primary menus of android. They can be used for settings, search, delete item etc. we are inflating the menu by calling the inflate() method of MenuInflater class. To perform event handling on menu items, you need to override onOptionsItemSelected() method of Activity class.

Context Menu Android context menu appears when user press long click on the element. It is also known as floating menu.

Bottom sheets bottom sheet is a sheet of material that slides up from the bottom edge of the screen and presents a set of clear and simple actions

Please read this SO Answer difference-between-context-menu-and-option-menu-in-android

like image 101
IntelliJ Amiya Avatar answered Sep 22 '22 11:09

IntelliJ Amiya


Bottom sheet is an Android component that present anchored views at the bottom of the screen. It became popular on Android 5, you can find more information in the Material Design documentation.

Popup menu is a dialog box linked to a concrete element in the UI, with it you can implement the Quick Actions UI pattern.

like image 41
mlevytskiy Avatar answered Sep 22 '22 11:09

mlevytskiy