设置屏幕显示模式ScreenOrientation.

在activity里设置android:screenOrientation的值。
android:screenOrientation的属性有以下值:
unspecified(默认值,由系统判断状态自动切换),The default value. The system chooses the orientation. The policy it uses, and therefore the choices made in specific contexts, may differ from device to device.
landscape,横屏
portrait,竖屏
user(用户当前设置的orientation值),The user's current preferred orientation.
behind(下一个要显示的Activity的orientation值),The same orientation as the activity that's immediately beneath it in the activity stack.
sensor(传感器的方向),The orientation determined by a physical orientation sensor. The orientation of the display depends on how the user is holding the device; it changes when the user rotates the device.
nosensor(不使用传感器,这个效果差不多等于unspecified).An orientation determined without reference to a physical orientation sensor. The sensor is ignored, so the display will not rotate based on how the user moves the device. Except for this distinction, the system chooses the orientation using the same policy as for the "unspecified" setting.

更多相关文章

  1. android中sqlite的使用
  2. Android在屏幕任意位置显示对话框
  3. android实现边框圆角
  4. Android开发之Activity(二)——启动模式和taskAffinity属性
  5. Android中的共享设置(SharedPreferences)
  6. Android(安卓)selector下的属性值
  7. android:clipChildren属性的分析——是否剪裁子View
  8. Android(安卓)远程监控摄像头 移动端+PC端 旧手札变废为宝
  9. Android(安卓)drawableleft如何设置图片大小

随机推荐

  1. JAVA 实现tail -f 日志文件监控功能
  2. Servlet也是一个Java类.为什么我不可以将
  3. 单例模式中的懒汉模式和饿汉模式
  4. tomcat启动web项目时候突然卡住
  5. 导致org.hibernate创建记录。MappingExce
  6. php RSA加密 JAVA 证书生成
  7. android与后台服务器的前后端通信
  8. java动态加载jar文件
  9. 003 恶补java运算(内容网摘)
  10. WebBrowser 遇到 javascript:void(0) 页