I have been messing with the issue for days to try and place the
camera preview onto a surfaceview defined in my xml layout. Main
reason I am trying to do this is to place it onto a tabview.

>From my understanding the application references a holder which is
used to tie to the surface view to paint.
So on the Preview API  example, if I changed it from
mHolder = getHolder();
mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
to
SurfaceView mysurfaceview = (SurfaceView)findViewById
(R.id.SurfaceView01);
mHolder = mysurfaceview.getHolder;
mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

My app compiles fine, but crashes @ runtime.

That should work, but I don't think I have seen an application YET
where the camera preview is loaded onto a SurfaceView. I am able to
resize the preview using the width and height, but that does not
really help as I can't seem to position the view where I need it to
be.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to