Menus are an essential part of almost any operating system. On mobile systems where screen real estate is limited, they play an even more important role. Android provides similar mechanisms for menus as it does for other visual elements, making it possible to separate them from application code by the use of XML.
All Android handsets have a hard menu key for calling up secondary choices that do not need to be made available from a main screen, or perhaps need to be made available across an application.
In concord with Android's philosophy of separating appearance from function, menus are generally created in the same way as other visual elements, that is, with the use of a definitive XML layout file.
There is lot that can be done to control menus dynamically and Android provides classes and interfaces for displaying context-sensitive menus, organizing menu items into groups, and including shortcuts.