Android: Allow custom app instantiation

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7851 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
kim..ng 14 years ago
parent 2f8ae09033
commit d90f6e7e18
  1. 8
      engine/src/android/com/jme3/app/AndroidHarness.java

@ -95,7 +95,7 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
protected int screenOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR;
protected OGLESContext ctx;
protected GLSurfaceView view;
protected GLSurfaceView view = null;
protected boolean isGLThreadPaused = true;
final private String ESCAPE_EVENT = "TouchEscape";
@ -125,12 +125,12 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
// Create application instance
try
{
app = null;
view = null;
if (app == null)
{
@SuppressWarnings("unchecked")
Class<? extends Application> clazz = (Class<? extends Application>) Class.forName(appClass);
app = clazz.newInstance();
}
app.setSettings(settings);
app.start();

Loading…
Cancel
Save