Why My Camera preview shows Horizontal instead of the Vertical?

核能气质少年 提交于 2019-12-21 20:37:54

问题


In My Android Camera Application if i fix the Screen to the landscape then In landscape mode it seems as it have to be seen. but if i fix it to the portrait then the Camera preview is seen to the horizontal. Why it is Happening ? and Whats the Sollution for it ??


回答1:


 Camera.Parameters parameters = mCamera.getParameters();
 parameters.set("orientation", "portrait");
 mCamera.setParameters(parameters);

You can call startPreview() after this :)



来源:https://stackoverflow.com/questions/7885873/why-my-camera-preview-shows-horizontal-instead-of-the-vertical

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