摄像头强制肖像模式 [英] Force portrait mode in camera

查看:254
本文介绍了摄像头强制肖像模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我调用使用意图照相机和点击图片。 presently我在模拟器,想迫使相机点击在纵向模式下的照片(需要捕获应用程序工作的录像,所以方向的改变会看起来很糟糕),但在相机屏幕出现的景观,所有的进一步的活动,我援引 onActivityResult()。

I am invoking a camera using an intent and clicking a picture. Presently I am on emulator and would like to force camera to click the pictures in portrait mode(need to capture a video of app working,so orientation change would look bad) but the camera screen appears landscape and all the further activities which I invoke in onActivityResult().

点击活动布局出来,在这样的横向模式的图片后:

After clicking the picture the Activity layout comes out in landscape mode like this:

而我所有的previous活动的正确纵向显示。 我尝试添加

while all my previous activity have displayed correctly in portrait orientation. I tried adding

android:screenOrientation="portrait" 
android:configChanges="orientation|keyboardHidden"

以上,但没有avail.Though显示,当我打回家后,恢复它在纵向显示正常。活动

to the activity shown above but to no avail.Though when i hit home and upon resume it displays correctly in portrait.

那么,如何强制肖像模式??

So how do I force portrait mode??

推荐答案

无解的work.There是没有错的either.I得到它通过在高版本(API10至API15)运行工作布局。 奇怪的!!

None of the solutions work.There is nothing wrong with the layouts either.I got it to work by running on a higher version(API10 to API15). Weird!!

这篇关于摄像头强制肖像模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆