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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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.

Reply via email to