Browse Source

SDK:
- add some comments to android MainActivity

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8757 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

nor..67 13 years ago
parent
commit
a48083d775
1 changed files with 14 additions and 2 deletions
  1. 14 2
      jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java

+ 14 - 2
jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java

@@ -319,15 +319,26 @@ public class AndroidSdkTool {
     }
     }
 
 
     private static String mainActivityString(String mainClass, String packag) {
     private static String mainActivityString(String mainClass, String packag) {
-        String str = "package " + packag + ";\n"
+        String str = 
+                "package " + packag + ";\n"
+                + " \n"
                 + "import com.jme3.app.AndroidHarness;\n"
                 + "import com.jme3.app.AndroidHarness;\n"
                 + "import android.content.pm.ActivityInfo;\n"
                 + "import android.content.pm.ActivityInfo;\n"
                 + "import com.jme3.system.android.AndroidConfigChooser.ConfigType;\n"
                 + "import com.jme3.system.android.AndroidConfigChooser.ConfigType;\n"
+                + " \n"
                 + "public class MainActivity extends AndroidHarness{\n"
                 + "public class MainActivity extends AndroidHarness{\n"
+                + " \n"
+                + "    /*\n"
+                + "     * Note that you can ignore the errors displayed in this file,\n"
+                + "     * the android project will build regardless.\n"
+                + "     * Install the 'Android' plugin under Tools->Plugins->Available Plugins\n"
+                + "     * to get error checks and code completion for the Android project files.\n"
+                + "     */\n"
+                + " \n"
                 + "    public MainActivity(){\n"
                 + "    public MainActivity(){\n"
                 + "        // Set the application class to run\n"
                 + "        // Set the application class to run\n"
                 + "        appClass = \"" + mainClass + "\";\n"
                 + "        appClass = \"" + mainClass + "\";\n"
-                + "        //eglConfigType = ConfigType.FASTEST;  // Default\n"
+                + "        // Try ConfigType.FASTEST; or ConfigType.LEGACY if you have problems\n"
                 + "        eglConfigType = ConfigType.BEST;\n"
                 + "        eglConfigType = ConfigType.BEST;\n"
                 + "        // Exit Dialog title & message\n"
                 + "        // Exit Dialog title & message\n"
                 + "        exitDialogTitle = \"Exit?\";\n"
                 + "        exitDialogTitle = \"Exit?\";\n"
@@ -341,6 +352,7 @@ public class AndroidSdkTool {
                 + "        // Invert the MouseEvents Y (default = true)\n"
                 + "        // Invert the MouseEvents Y (default = true)\n"
                 + "        mouseEventsInvertY = true;\n"
                 + "        mouseEventsInvertY = true;\n"
                 + "    }\n"
                 + "    }\n"
+                + " \n"
                 + "}\n";
                 + "}\n";
         return str;
         return str;
     }
     }