Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What effect does setting android:menuCategory attribute have?

Tags:

android

xml

menu

In Android menu resource, What's the difference whether android:menuCategory attribute exists or not?

I read document and created small test code but I can't make head or tail of meaning of this attribute and constants.

like image 832
nagoya0 Avatar asked Nov 16 '12 20:11

nagoya0


People also ask

What is showAsAction in Android?

android:showAsAction Keyword. When and how this item should appear as an action item in the app bar. A menu item can appear as an action item only when the activity includes an app bar.

What is onPrepareOptionsMenu Android?

Use onPrepareOptionsMenu if you need to enable/disable, show/hide, or add/remove items after creating it.

What is the use of menu in Android Studio?

Android Studio provides a standard XML format for the type of menus to define menu items. We can simply define the menu and all its items in XML menu resource instead of building the menu in the code and also load menu resource as menu object in the activity or fragment used in our android application.


1 Answers

By using android:menuCategory tags you specify the category of the group of the menu items and define the item's priority.

like image 78
Code Word Avatar answered Nov 15 '22 01:11

Code Word