Applying Menus

Like applications for the desktop and some mobile operating systems, such as Palm OS and Windows Mobile, Android supports activities with application menus. Some Android phones will have a dedicated menu key for popping up the menu; others will offer alternate means for triggering the menu to appear.

Also, as with many GUI toolkits, you can create context menus. On a traditional GUI, this might be triggered by the right mouse button. On mobile devices, context menus typically appear when the user taps-and-holds over a particular widget. For example, if a TextView had a context menu and the device was designed for finger-based touch input, you could push the TextView with your finger, hold it for a second or two, and a pop-up menu would appear for you to choose from.

Android differs from most other GUI toolkits in terms of menu construction. While you can add items to the menu, you do not have full control over the menu's contents, nor of the timing of when the menu is built. Part of the menu is system-defined, and that portion is managed by the Android framework itself.

0 0

Post a comment