Menus Flashcards

1
Q

What is a menu?

A

A common UI component used to present user actions and
other options in an application’s activity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the three fundamental types of menus?

A

– Options menu – Contains actions that have a global impact on an application
– Context menu – A floating menu that appears when the user performs a long-click on an element, providing actions on the selected context
– Popup menu – Displays a list of items in a vertical list that is anchored to the view that invoked the menu.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Where are menus defined

A

Menus and their items in Android applications should
be defined in XML under the menu resources (res/menu). These can then be inflated (loaded) in a given activity or fragment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why are XML menu resources used?

A

– They make it easier to visualize the menu structure
– They separate the menu content from an activity’s/ fragment’s code
– Allows for the creation of alternative menu configurations
for diverse platforms, screen sizes, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What elements are used to build menus

A

<menu>
<item>
<group>
</group></item></menu>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe <menu>

A

● Defines a Menu, which is a container for menu items.
● A <menu> element must be the root node for the file and can hold one or more <item> and <group> elements.</group></item>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe <item></item>

A

● Creates a MenuItem, which represents a single item in a menu.
● This element may contain a nested <menu> element in order to create a submenu.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe <group></group>

A

● An optional, invisible container for <item> elements.
● It allows one to categorize menu items so they share properties such as active
state and visibility</item>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly