GOOD NEWS

GOOD NEWS
Ask For The Truth...

Wednesday, July 11, 2012

Android Tutorial (8) – How to add a menu, programmatic vs. declarative solution

Android mobile applications have the advantage of being deployed on mobile devices that have touch displays. This enhance the user experience and allows developers to design the user interface so it will be dynamic, easy to use and efficient. Despite this advantage, the display size and usability concepts (one golden rule is to have all the window controls visible on the display) limit the number of buttons and visual controls that can be placed on a single window/form. So, application wide options and functions can be made available using a menu, leaving the display for particular and contextual options.

A menu is a group of options (items) that are accessed using the device Menu key. The menu items are represented by single options or by groups of options, which are organized in submenus.
In this article, we will see how to add a menu to the Android application. The solution is implemented using both the programmatic and the declarative solution that uses menu.xml files. For the declarative solution we will use also the Android visual editor for menus.


No comments:

Post a Comment