Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Different Menu Resources

Doe's Android support multiple menu folder (e.g. like /drawable-hdpi and /drawable-mdpi)? If so what types are supported (land, xhdpi, swXXXdp)?

P.S. Sorry for such a goofy question...

Edit 1: For example I have different layouts. Depending on that I can have different menu resources, no? As a start it would be nice to have sooch folders:

  • res/menu
  • res/menu-land
  • res/menu-xhdpi
  • res/menu-xhdpi-land
  • res/menu-sw600dp

The first two work fine... but when I try to add the other ones the app work instable on different devices.

like image 513
Serj Lotutovici Avatar asked Oct 24 '12 08:10

Serj Lotutovici


People also ask

What are the different types of menus in Android?

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. To learn how to use them, read on. As shown in the code snippet above, each menu item has various attributes associated with it.

What is difference between Option menu and context menu in Android?

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.

Which are the primary menus of Android?

Android Option Menus are the primary menus of android. They can be used for settings, search, delete item etc. When and how this item should appear as an action item in the app bar is decided by the Show Action attribute.


3 Answers

Yes. even in portrait and landscape modus:

menu-land-mdpi menu-port-mdpi

menu-land-hdpi menu-port-hdpi

menu-land-xhdpi menu-port-xhdpi

like image 139
Festus Tamakloe Avatar answered Nov 07 '22 22:11

Festus Tamakloe


yes. Don't see any point not to support it, documentation here provides no restrictions on it (I myself at least have used -land qualifier)

like image 35
sandrstar Avatar answered Nov 08 '22 00:11

sandrstar


The menu can be used like layout folder, you can add menu-land, menu-port ... also, you can use specific menu for multi langue, like menu-fr, menu-en to rearrange items based on phone language...

like image 27
Anis BEN NSIR Avatar answered Nov 07 '22 22:11

Anis BEN NSIR