Hi,

In my app, i have a TabActivity with 2 tabs.
-Tab1 displays a web page (with WebViewClient)
-Tab2 displays contains a FrameLayout with 2 SurfaceViews :

The first SurfaceView contains the videocapture from the camera.
The second surfaceview is a GLSurfaceView.

The app works fine. I can switch from a tab to another.

But i want optimise my app :
When i switch from Tab2 to Tab1, i want to "pause" my render.
So in the Tab2 activity i reimplement

 @Override
    public void onPause() {
        Log.i(LOGTAG, "onPause");
        super.onPause();
        myGLSurfaceView.onPause();

    }
    @Override
    public void onResume(){
        Log.i(LOGTAG, "onResume");
        super.onResume();
        myGLSurfaceView.onResume();
    }


With this code, my render is stopped, but when i reswitch in the Tab2,
the GLSurfaceView is recreated (onSurfaceCreated(GL10 gl, EGLConfig
config) is called). The surface is re-created but i have never seen a
surfaceDestroyed call.

What's wrong?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to