Hello, I'm newbie developing Android applications, and I have started a projected alredy started. The project has 3 views: one view is a VideoView (public class VRVideoPlayerSensaciones extends VideoView implements MediaPlayer.OnErrorListener, OnPreparedListener), other GLSurfaceView (public class VRView extends GLSurfaceView), and the last one a surfaceview to do the preview image from de camera (public class VRCameraPreview extends SurfaceView implements SurfaceHolder.Callback, Camera.PreviewCallback, Camera.AutoFocusCallback) . All theses views are added to a framelayout. My problem is that the first time I execute the application, all the views they work properly. The surface for VRCameraPreview is in the back, the GLSurfaceView to represent openGL scene, and the last one the videoview (VRVideoPlayerSensaciones ) is in the top of the layout. But after starting another activity, for instance, to send and e-mail, with the activity resume, all the views doesn't respect the z-order from the beginning, and the top view, is the preview frame (VRCameraPreview), and the last one VideoView (VRVideoPlayerSensaciones).
Do you if there is a way to respect the original zorder of these views? All the vies are builded at runtime, here you can see the code: public void onCreate(Bundle savedInstanceState) { mView = new VRView(getApplication()); mView.init(false, sDemo, bUseCamera); if(bUseCamera) mCamPreview = new VRCameraPreview(getApplication(), this); frame = new FrameLayout(this.getApplicationContext()); // videoview to play video m_VideoPlayerSensaciones = new VRVideoPlayerSensaciones(getApplication()); m_VideoPlayerSensaciones.Init(frame); //, 250, 80, 320, 240); frame.addView(m_VideoPlayerSensaciones); frame.addView(mView); if(bUseCamera) frame.addView(mCamPreview); setContentView(frame); } I have tried to use bringToFront from the view, to use AddContentView from the main activity2, and bringChildToFront from FrameLayout, but nothing work properly. Thank you in advance and sorry by my poor English -- 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