Android: Camera Preview Orientation on HTC EVO (Android 2.1 or 2.2)

六眼飞鱼酱① 提交于 2019-12-08 18:40:29

Try locking the orientation of the Activity in horizontal if that fits with your design, or have a play with these:

private android.hardware.Camera mCamera;

...

mCamera.setDisplayOrientation(90);
params.setRotation(90);
mCamera.setParameters(params);

But I think setDisplayOrientation might be 2.2 only...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!