In the Android operating system, there are many new functions and features that deserve our in-depth research. For example, the Android menu system introduced today is one of the basic aspects. We need to learn about it through various channels.
- Android sensor programming experience
- Basic Application Methods of Android single queue
- Analysis of Android output Log related application skills
- Android local broadcast Operation Analysis
- Android Widget Toolkit
If you have tried to use a pen or trackball to navigate the mobile phone menu system, you will know that using a traditional menu system on mobile devices is clumsy.
To improve the practicality of the app menu, Android provides a three-phase optimized Android menu system for the small screen:
◆Icon menu in Android Menu System
When the Menu button is pressed, this Compact Menu 1-1) is displayed at the bottom of the screen. It displays menu items with up to 6 icons and text ).
Figure 1-1
This type of Icon menu does not display the checkbox, radio button, and shortcut keys as menu items. Therefore, the general habit is not to specify the checkbox or radio button as menu items, because they will not be available.
If More than 6 menu items are defined, More menu items are included. When selected, the extended menu is displayed. Click Back to close the icon menu.
◆Extended menu of Android Menu System
The extended menu is triggered when you select More from the icon menu. Extended menu 1-2) displays a scrolling menu item list that cannot be visible in the icon menu. This Menu displays all text, shortcuts, checkbox, and radio buttons.
Figure 1-2
Then, it does not display the icon. Therefore, you should avoid specifying icons for menu items that may only appear in the extended menu.
Click Back to return to the icon menu from the extended menu.
You cannot force Android to use extended menus to replace Icon menu display. Therefore, you must note that the checkbox or radio button menu items can only be used in extended menus or their status information can be displayed using icons or text.
◆Sub-menu of Android Menu System
The traditional "extended hierarchy tree" is clumsy for mouse navigation, so it is not surprising that it is especially inappropriate to use it on mobile devices. Android uses a floating window to display each sub-menu. For example, when you select a sub-menu marked as Submenu in Figure 1-2, its menu items are displayed in a floating menu dialog box, 1-3.
Figure 1-3
Note: The name of the sub-menu is displayed on the Header bar of the headlines. Its Sub-menu is displayed as full text, checkbox if needed), and shortcut keys. Because Android does not support nested sub-menus, you cannot add sub-menus for sub-menus, which may cause exceptions ).
Like extended menus, icons are not displayed in sub-menu items. Therefore, it is recommended that you do not specify icons for sub-menu items.
Pressing the Back button will close the floating window without navigating Back to the extended menu or icon menu.
The above is an introduction to the Android menu system.