Before We Begin

In the rest of this chapter, we'll write a lot of small examples, as we did in Chapter 4 when discussing the Android API basics. We'll use the same starter class as we did in Chapter 4, which shows us a list of test Activitys we can start. The only things that will change are the names of the Activitys we instantiate via reflection, and the package they are located in. All the examples of the rest of this chapter will be in the package com.badlogic.androidgames.glbasics. The rest of the code will stay the same. Our new starter Activity will be called GLBasicsStarter. We will also copy over all the source code from Chapter 5, which contains our framework classes, as we of course want to reuse those. Finally, we will write some new framework and helper classes, which will go in the com.badlogic.androidgames.framework package and subpackages.

We also have a manifest file again. As each of the following little examples will be an Activity, we also have to make sure it has an entry in the manifest. All the examples will use a fixed orientation (either portrait or landscape, depending on the example), and will tell Android that they can handle keyboard, keyboardHidden, and orientationChange events.

With that out of our way, let the fun begin!

0 0

Post a comment