tags:

views:

41

answers:

1

The sample in question is: CameraPreview

I was wondering what piece of code is making the preview become rotated 90 degrees to the left? I'm certain there's something very obvious I'm overlooking but I just can't seem to find the culprit. Thanks in advance, I really appreciate it.

A: 

The ApiDemos AndroidManifest.xml file has android:screenOrientation="landscape" set for the CameraPreview activity.

CommonsWare
I've actually copied the code from the sample into my own project and have the screenOrientation set to portrait. I've found though, if I remove that tag, when I change my phone to landscape, the image is correctly displayed (albeit a bit squished, but I think that has to do with the getOptimalPreviewSize method).Thanks.
noisesolo