摄像头摄像头preVIEW不正确setdisplayorientation在android的后 [英] Camera camera preview is not Proper after setdisplayorientation in android
问题描述
我尝试在我的应用程序来实现摄像头,但我发现,定位preVIEW是所有的时间在景观,但我的应用程序是在人像,所以我需要它在纵向模式我发现有关的一些解决方案,如
i m trying to implement camera in my app but i found that the orientation preview is all time in landscape but my app is in portrait so i need it in to portrait mode i found some solutions about that like
mCamera.setDisplayOrientation(90);
其工作良好,银河TAB2和HTC,但是当我在索尼Xperia索拉测试它显示奇怪听到我添加它的图像画面
its working good with Galaxy tab2 and htc but when i test it in sony xperia sola it display strange hear i add image screen of it
ü可以看到,摄像头的preVIEW其显示的屏幕右侧只有
u can see that the preview of camera its display of right side of screen only
但是当我把照片从这个应用程序是显示正常。我不没有什么问题 谁能帮我在这。
but when i take picture from this app it display ok. i don't no what is the problem can anyone help me in this .
推荐答案
您可以尝试强制面尺寸(和位置) - 我遵循了这一路径,以弥补了类似的错误,在2.2版本的三星Galaxy S的错误是固定时,该设备升级为2.3
You can try to force the surface size (and position) - I followed this path to compensate a similar bug in 2.2 version of Samsung Galaxy S. The bug was fixed when the device upgraded to 2.3.
这篇关于摄像头摄像头preVIEW不正确setdisplayorientation在android的后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!