当前位置: 编程技术>移动开发
android 横竖屏限制的配置方法
来源: 互联网 发布时间:2014-10-16
本文导语: 在开发android的应用中,有时候需要限制横竖屏切换。只需要在AndroidManifest.xml文件中加入android:screenOrientation属性限制。ndroid:screenOrientation="landscape"是限制此页面横屏显示, ndroid:screenOrientation="portrait"是限制此页面数竖屏显示。...
在开发android的应用中,有时候需要限制横竖屏切换。只需要在AndroidManifest.xml文件中加入android:screenOrientation属性限制。
ndroid:screenOrientation="landscape"是限制此页面横屏显示,
ndroid:screenOrientation="portrait"是限制此页面数竖屏显示。
例如:我现在想让所有的页面不管怎么样都竖屏显示,则我的AndroidManifest.xml应该这样写:
http://schemas.android.com/apk/res/Android"
< package="com.oa"
android:versionCode="1"
android:versionName="1.0">
ndroid:screenOrientation="landscape"是限制此页面横屏显示,
ndroid:screenOrientation="portrait"是限制此页面数竖屏显示。
例如:我现在想让所有的页面不管怎么样都竖屏显示,则我的AndroidManifest.xml应该这样写:
代码如下:
http://schemas.android.com/apk/res/Android"
< package="com.oa"
android:versionCode="1"
android:versionName="1.0">
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。