Android - AndroidManifest.xml - android:screenOrientation
来源:互联网 发布:知乎 量子通信 骗局 编辑:程序博客网 时间:2024/05/16 11:08
在开发android的应用中,有时候需要限制横竖屏切换。只需要在AndroidManifest.xml文件中加入android:screenOrientation属性限制。
- android:screenOrientation="landscape"是限制此页面横屏显示,
- android:screenOrientation="portrait"是限制此页面数竖屏显示。
- android:screenOrientation="landscape"是限制此页面横屏显示,
- android:screenOrientation="portrait"是限制此页面数竖屏显示。
android:screenOrientation设定该活动的方向,该值可以是任何一个下面的字符串:
"unspecified"
- 默認值. 由系統選擇顯示方向. 在不同的設備可能會有所不同.
"landscape"
- 橫向
"portrait"
- 縱向
"user"
- 用戶當前的首選方向
"behind"
- 與在活動堆棧下的活動相同方向
"sensor"
- 根據物理方向傳感器確定方向. 取決於用戶手持的方向, 當用戶轉動設備, 它跟隨改變.
"nosensor"
- 不經物理方向傳感器確定方向. 該傳感器被忽略, 所以當用戶轉動設備, 顯示不會跟隨改變. 除了這個區別,系統選擇使用相同的政策取向對於“未指定”設置. 系統根據“未指定”("unspecified")設定選擇相同顯示方向.
0 0
- Android - AndroidManifest.xml - android:screenOrientation
- android:screenOrientation
- android:screenOrientation
- android:screenOrientation
- android:screenOrientation
- android:screenorientation
- 通过XML设置屏幕方向(android:screenOrientation)
- android 解压 AndroidManifest.xml
- AndroidManifest.xml/Android.mk
- android androidManifest.xml 解释
- Android之AndroidManifest.xml
- Android AndroidManifest.xml反编译
- android之AndroidManifest.xml
- Android - AndroidManifest.xml - Provider
- Android AndroidManifest.xml 详解
- Android AndroidManifest.xml
- Android - AndroidManifest.xml - android:configChanges
- android:configChanges android:screenOrientation
- atitit. orm框架的hibernate 使用SQLQuery createSQLQuery addEntity
- Android背景变暗的PopupWindow 可指定变暗区域
- C++编程命名规范
- 【问题解决】syntax error: unexpected end of file或-bash: ./full_build.sh: /bin/bash^M: bad interpreter: No
- 中文字体的英文名称对照表
- Android - AndroidManifest.xml - android:screenOrientation
- JQuery.cookie
- const在c/c++中的区别
- 程序员的编辑器——VIM
- java的reflection机制
- linux下安装使用jprofiler8(tomcat)
- mongodb创建、更新、删除
- android View的ScrollBy ScrollTo getScrollX getScrollY
- sqlserver安全加固