I have a surface view displaying a camera preview which looks good in landscape mode, but when I rotate my phone to portrait the surface view rotates and the camera preview is on its side which looks wrong.
When I fix my application orientation to landscape in my AndroidManifest.xml
, the surface view behaves how I want it to, in that it doesn't rotate and the camera preview works great.
The problem is that I have other objects on the screen which need to rotate with the phone's orientation, which now doesn't because I've set the orientation to landscape.
Can anyone help me with a way to get everything apart from the surface view to rotate when the phone rotates, or if that is not possible a way to get the current physical orientation of the phone when the applications orientation is set to landscape, so that I can rotate my other objects manually.
Thanks, Andrew