I am trying to put the camera in a surfaceView in portrait orientation on android phone. I used http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html to put the camera in the surfaceView. However the camera is rotated 90 degrees, so I tried doing setDisplayOrientation(90) to fix it, but this squashes the image (it Probably isn’t resizing the surfaceView properly??). How can I make it so the camera is not squished?
Share
You need to resize the image according to the rotation. See here for an example.