/** * Called by the system to create the View hierchy associated with this * Fragment. For jME, this is a FrameLayout that contains the GLSurfaceView * and an overlaying SplashScreen Image (if used). The View that is returned * will be placed on the screen within the boundries of the View borders defined * by the Activity's layout parameters for this Fragment. For jME, we also * update the application reference to the new view. * * @param inflater * @param container * @param savedInstanceState * @return */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { logger.fine("onCreateView"); // Create the GLSurfaceView for the application view = ((OGLESContext) app.getContext()).createView(getActivity()); // store the glSurfaceView in JmeAndroidSystem for future use JmeAndroidSystem.setView(view); createLayout(); view.addOnLayoutChangeListener(this); return frameLayout; }