- add package to MainActivity class

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8214 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent 190f4a4886
commit 69294ee52c
  1. 7
      sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java

@ -217,7 +217,7 @@ public class AndroidSdkTool {
if (mainAct != null) { if (mainAct != null) {
lock = mainAct.lock(); lock = mainAct.lock();
OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(mainAct.getOutputStream(lock))); OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(mainAct.getOutputStream(lock)));
out.write(mainActivityString(mainJmeClass)); out.write(mainActivityString(mainJmeClass, packag));
out.close(); out.close();
lock.releaseLock(); lock.releaseLock();
} else { } else {
@ -261,8 +261,9 @@ public class AndroidSdkTool {
} }
} }
private static String mainActivityString(String mainClass) { private static String mainActivityString(String mainClass, String packag) {
String str = "import com.jme3.app.AndroidHarness;\n" String str = "package "+packag+";\n"
+ "import com.jme3.app.AndroidHarness;\n"
+ "import android.content.pm.ActivityInfo;" + "import android.content.pm.ActivityInfo;"
+ "import com.jme3.system.android.AndroidConfigChooser.ConfigType;" + "import com.jme3.system.android.AndroidConfigChooser.ConfigType;"
+ "public class MainActivity extends AndroidHarness{\n" + "public class MainActivity extends AndroidHarness{\n"

Loading…
Cancel
Save