5

POLISHING YOUR APP BY ADDING MENUS AND PREFERENCES

Image

You’ve written a fun Android app, but it’s still missing a few things. You haven’t learned how to build a settings or options menu in Android or how to save high scores, game stats, and other information. In this chapter, we’ll add an options menu to our Hi-Lo guessing game app and the capability to store information.

Adding an Options Menu in Android

Most apps and games have options or settings that the user can access through a menu. For the Hi-Lo guessing game, we might want to allow the user to change the game’s difficulty level, start over, see their game stats, or view an About screen, ...

Get Learn Java the Easy Way now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.