O'Reilly logo

Beginning Android Tablet Games Programming by Jeremy Kerfs

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

Getting a Professional Look

Games are meant to be played as immersively as possible. To make this possible on a tablet or any device, you have to remove all the bars and menus that remind the player of the world outside their game. Android has some features that make this effective, but Android 3.0 includes features that actually mandate having the system bar always visible. Regardless, you can hide the action bar with a simple line in the MainActivity.java file. Listing 2-11 shows the statement that should go right after the super command.

Listing 2-11. Removing the Action Bar

getActionBar().hide();

If you run the project now, the top bar that has the Android robot icon in it is gone. The image should move across the screen as normal. To make ...

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