在开发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">

                                            android:screenOrientation="portrait">

更多相关文章

  1. Android中Java和JavaScript交互解决方案,以及问题解决大全
  2. GDB在线调试Android(安卓)Framework Native C/C++代码
  3. android显示通知栏
  4. android 发送短信,彩信,邮件代码
  5. Android下拉列表控件spinner-andoid学习之旅(十一)
  6. Android(安卓)Studio 使用NDK编译时常见的问题
  7. Android(安卓)启动 Launcher
  8. Android用户注册界面
  9. android TextView 不显示文字

随机推荐

  1. android点击空白处隐藏键盘(亲测)
  2. Android搜索关键字变色
  3. 使用PhoneGap调用Camera (android)
  4. 使用googleMap 需要获取的apikey方法
  5. android倒计时广告进度条
  6. 【Android(安卓)开发教程】使用Intent发
  7. Android 隐藏及切换显示键盘
  8. Android(安卓)-- 重置Bitmap大小&&Bitmap
  9. 头像及封面的裁剪与预览
  10. android 如何设置dialog的透明度