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 ...

Get Beginning Android Tablet Games Programming 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.