Game Development Reference
In-Depth Information
Getting ready
Let us set up the directory structure of our project (see the following screenshot):
This is a typical structure for any Android project. We will create all the required iles manually
rather than using Android tools.
How to do it...
Place the Java
Activity
code into the
App1\src\com\packtpub\ndkcookbook\app1\
App1Activity.java file
, which should look as follows:
package com.packtpub.ndkcookbook.app1;
import android.app.Activity;
public class App1Activity extends Activity
{
};
The localizable application name should go to
App1\res\values\strings.xml
. The string
parameter
app_name
is used in the
AndroidManifest.xml
ile to specify the user-readable
name of our application, as seen in the following code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">App1</string>
</resources>