Hi, thanks for your response. how do i give different z index? isn't it automatically when we call add() ? so i attach alParent.addView(mCameraView); first and then alParent.addView(view); so isn't it means mCameraView at index 0, and view at index 1? but still i cannot see the opengl object, only camera preview
when i change alParent.addView(view); first and then alParent.addView(mCameraView); i see the opengl object only... On Mar 25, 1:29 pm, rollbak <roll...@gmail.com> wrote: > Hello, > > If you want one on top of the other you must use a FrameLayout and > then give different z index to each when adding them as childs. > > regards, > > Lucas > > On Mar 25, 3:07 am, sleith <raysle...@gmail.com> wrote: > > > Hi, > > i tried to have a GLSurfaceView on top of camera surface, so that i > > can draw gl objects with camera preview as background. > > I tried but didn't works. the view i has is something like this: > > > //////////////////////////////////////////////////////////////////////////////////////////// > > AbsoluteLayout alParent = new AbsoluteLayout(this); > > alParent.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, > > LayoutParams.FILL_PARENT)); > > > //CameraView extends SurfaceView implements SurfaceHolder.Callback > > mCameraView = new CameraView(this); > > mCameraView.setLayoutParams(new AbsoluteLayout.LayoutParams( > > AbsoluteLayout.LayoutParams.FILL_PARENT, > > AbsoluteLayout.LayoutParams.FILL_PARENT, 0, > > 0)); > > alParent.addView(mCameraView); > > > //GLView extends GLSurfaceView > > view = new GLView(this); > > view.setLayoutParams(new AbsoluteLayout.LayoutParams( > > AbsoluteLayout.LayoutParams.FILL_PARENT, > > AbsoluteLayout.LayoutParams.FILL_PARENT, 0, > > 0)); > > alParent.addView(view); > > //////////////////////////////////////////////////////////////////////////////////////////// > > > it resulting the camera preview only, the opengl is not drawn. ( i > > made sure without camera, the opengl draws cube). > > Anyone have experienced this kind of situation? > > Thanks :) -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.