Before We Begin

Throughout the rest of this chapter, we'll provide many brief examples, as we did in Chapter 4 when we discussed Android API basics. We'll use the same starter class that we did in Chapter 4, which shows you a list of test Activities you can start. The only things that will change are the names of the Activities you instantiate via reflection, and the package in which they are located. All the examples in the rest of this chapter will be in the package com.badlogic.androidgames.glbasics. The rest of the code will stay the same. Your new starter Activity will be called GLBasicsStarter. You will also copy over all the source code from Chapter 5, which contains your framework classes, as you of course want to reuse those. Finally, you 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 examples will be an Activity, we also have to make sure each activity 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!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset