Working with Menus and Dialogs

I n Chapter 3 we introduced you to resources, content providers, and intents—the foundations of the Android SDK. Then we covered UI controls and layouts in Chapter 4. Now we'll show you how to work with Android menus and dialogs.

The Android SDK offers extensive support for menus and dialogs. You'll learn to work with several of the menu types that Android supports, including regular menus, submenus, context menus, icon menus, secondary menus, and alternative menus. The Android SDK also allows you to load menus from XML files and generates resource IDs for each of the loaded menu items. We will cover these XML menu resources as well.

Dialogs in Android are asynchronous, which provides flexibility. But if you are accustomed to the Microsoft Windows environment where dialogs are synchronous, you might find asynchronous dialogs a bit hard to use. After giving you the basics of creating and using these Android dialogs, we will provide an abstraction that will make it easier to use them.

0 0

Post a comment