What is the correct (or any) way to remove a view that has been set using setContentView. The application is basically a NativeActivity application that uses openGL and as such has no layouts/views defined. I needed to add a splash screen very early on and so from java create a class derived from SurfaceView to display a resource image. This all works fine and I set the SurfaceView using
mySurfaceView = new SplashScreen(getApplicationContext());
setContentView(mySurfaceView);
The problem is i dont seem to be able to remove this view to see my openGl application. I can hear the audio and it seems to be running, but this splash screen is topmost. Ive tried setting visibility, using setContnetView(null), setting a basic blank textview instead, but nothing seems to work.
Any ideas would be great.
Thanks
setcontentview can be called only once in a activity. You can try to setcontentview in if-else condition but it can be done only once and only in oncreate.