O'Reilly logo

Android Game Recipes: A Problem-Solution Approach by J. F. DiMarzio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter     4

The Menu Screen

You might have already built a game, or are in the process of building one, but still need a proper menu screen from which to launch it. Fear not. If you are having problems creating a working menu screen for your game, this chapter should be able to help you out.

In this chapter, you will find solutions for creating a two-button menu screen, wiring the buttons on said menu screen to start and exit the game, and many more problems that could arise while you create a menu.

The first solution will give you a proper, two-button menu screen for your game.

4.1 Create a Two-Button Menu Screen

Problem

Your game needs a menu screen for presenting options to the player.

Solution

Create a menu using an Android layout ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required