@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { Thread.sleep(16); mGLSurfaceView = new AngleSurfaceView(this); mGLSurfaceView.setAwake(true); mGLSurfaceView.start(); } catch (InterruptedException e) { e.printStackTrace(); } }
/** * Set the current user interface * * @param currentUI */ public void setUI(AngleUI currentUI) { if (mCurrentUI != currentUI) { if (mCurrentUI != null) { mCurrentUI.onDeactivate(); mGLSurfaceView.removeObject(mCurrentUI); } mCurrentUI = currentUI; if (mCurrentUI != null) { mCurrentUI.onActivate(); mGLSurfaceView.addObject(mCurrentUI); } } }
@Override public void finish() { mGLSurfaceView.delete(); super.finish(); }
@Override protected void onResume() { super.onResume(); mGLSurfaceView.onResume(); if (mCurrentUI != null) mCurrentUI.onResume(); }