相机在纵向模式下伸展

use*_*920 6 camera android orientation

我试图将相机放在Android手机上的纵向SurfaceView中.我使用http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html将相机放入surfaceView.然而,相机旋转90度,所以我尝试使用setDisplayOrientation(90)来修复它,但这会压缩图像(它可能没有正确调整SurfaceView的大小?).我该怎么做才能让相机不被挤压?

Joh*_*ith 6

您需要根据旋转调整图像大小.请看这里的例子.