November 2011
Beginner
196 pages
5h 3m
English
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 ...
Read now
Unlock full access