You now have a thorough understanding of Android menus and dialogs, which are key components of UI programming. You learned how to work with the various kinds of menus available in Android, including submenus, icon menus, context menus, and alternative menus. You also saw how to work with menus more effectively by using XML menu resources.

We presented a test harness for the menus, which you'll find useful not only for testing menus but also for testing other programs you end up writing. Menus provide a simple way to invoke and test new functionality.

You also saw that dialogs present a special challenge in Android. We showed you the implications of asynchronous dialogs and presented an abstraction to simplify the managed dialogs.

The knowledge you gained in this chapter and in the previous chapter on UI controls should give you a good foundation for writing your own complex UI programs. This foundation should also serve you well in preparation for the next chapter on animation.

chapter 6

0 0

Post a comment