Anyway to place camera preview onto xml defined surfaceview?

by chrispix » Tue, 16 Dec 2008 06:05:13 GMT


Sponsored Links
 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.

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.


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. trying to install android sdk

when I m trying to install android sdk 2.0 in my windows xp .. i found
an error says

Failed to fetch URL http://dl-ssl.google.com/android/repository/repository.xml,
reason: Server returned HTTP response code: 403 for URL:
http://dl-ssl.google.com/android/repository/repository.xml

how to resolve it?

--

2. What is the appropriate e-mail list?

Where does one post questions regarding open-source Android platform build
problems on Mac OS-X ?
Here?

My questions/issue has also been posted as an issue on the platform:
http://code.google.com/p/android/issues/detail?id=5000
(A similar issue has been posted as a bug on Apple bug reports.)

I'm wondering if anyone else has run into it and whether there are any
workarounds.

- m.

--

3. getting error in gallery sample

4. jpg images noisy on sdcard but fine in gallery, only on Android 1.6 (1.5 is fine)

5. Checkout Check: An Android interface to Google Checkout

6. wifi configuration

7. December 11th Update - Note to Android developers(?)