安卓3.0开始横竖屏变化时不会触发onConfigurationChanged事件。
因为Activity总是需要重新创建。

判断横竖屏的方法:
在ACTIVITY的onCreate()方法里使用以下判断
if (getResources().getConfiguration().orientation
== Configuration.ORIENTATION_LANDSCAPE) {
// If the screen is now in landscape mode
// 横屏显示中
}

else if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){
//竖屏 ,标准模式 320x480

}

3.0之前的版本是这样获取横竖屏状态的:

http://blog.csdn.net/tsk/article/details/6633905

更多相关文章

  1. 获取Android系统中全部正在运行的程序
  2. android keydown touch事件传递
  3. Android(安卓)Fragment详解(二):Fragment创建及其生命周期
  4. android调用webservice方法,参数或返回值使用服务器端类
  5. Android(安卓)中使用自定义字体的方法
  6. 每次吃一点Androidの小知识
  7. if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.....)
  8. Android(安卓)实现事件监听器的五种处理方法
  9. android 初识EventBus

随机推荐

  1. Windows下通过MySQL Installer安装MySQL
  2. 删库跑路?使用xtraback备份MySQL数据库的
  3. mysql 5.7.23 解压版安装教程图文详解
  4. MySQL数据迁移使用MySQLdump命令
  5. Mysql查询表中最小可用id值的方法
  6. 详解Mysql导出数据的几种方式
  7. windows下傻瓜式安装mysql5.7
  8. MySQL因大事务导致的Insert慢实例分析
  9. CentOS 7中升级MySQL 5.7.23的坑与解决方
  10. MySQL服务器 IO 100%的分析与优化方案