锁定设备景观方向 [英] Lock Device Landscape Orientation
本文介绍了锁定设备景观方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我工作的一个项目,我需要帮助如何锁定在移动设备上横向。我已经申请,他们让我改变能见度CSS媒体属性,但我想,一旦我在纵向模式在网页上它不会允许改变它的方向INFACT它会锁定任何。
I am working on a project and I need help how to lock landscape orientation on mobile devices. I have applied CSS media properties they let me change the visibility but I want once I am in portrait mode on a webpage it wont allow to change it's orientation infact it would lock whatsoever.
推荐答案
添加的android:screenOrientation =风景
到活动
在的AndroidManifest.xml
元素。例如:
<activity android:name=".SomeActivity"
android:label="@string/app_name"
android:screenOrientation="landscape">
有关详细信息: Android的 - 禁用风景模式
这篇关于锁定设备景观方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文