android 获取屏幕的方向
来源:互联网 发布:市政道路工程验收数据 编辑:程序博客网 时间:2024/05/14 09:23
- Configuration newConfig = getResources().getConfiguration();
- if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE){
//横屏
}else if(newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){
//竖屏
}else if(newConfig.hardKeyboardHidden == Configuration.KEYBOARDHIDDEN_NO){
//键盘没关闭。屏幕方向为横屏
}else if(newConfig.hardKeyboardHidden == Configuration.KEYBOARDHIDDEN_YES){
//键盘关闭。屏幕方向为竖屏
}
0 0
- android 获取屏幕的方向
- android 获取屏幕的方向
- android 获取屏幕的方向
- android 获取屏幕方向详解
- Android 强制获取屏幕方向
- android 获取当前屏幕方向
- android 获取屏幕尺寸,设置屏幕方向
- Android获取手机分辨率 和屏幕的方向
- android 获取屏幕大小和方向
- 【Android】-获取屏幕尺寸以及方向
- Android--屏幕方向的改变
- Android屏幕方向的改变
- Android中屏幕的方向
- android APK的屏幕方向
- Android屏幕方向的选择
- Android 几种常用关于屏幕操作的方法(获取屏幕大小,全屏,显示方向)
- 获取设备屏幕方向变化的代码
- 获取屏幕方向
- 我的产品开发之旅(2) - MySQL设计用户相关表结构
- spring的IOC和DI中遇到的异常
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- 深度学习元老Yann Lecun详解卷积神经网络
- shell中grep:行过滤工具
- android 获取屏幕的方向
- VB6实现简单的扫雷小游戏
- MySQL优化工具之 profiling
- 为什么需要同步?
- bzoj 1087 [SCOI2005]互不侵犯King 状压dp
- 日常博客
- ThinkPHP5 与 ThinkPHP3.* 之间的使用差异
- 安卓:解决应用前后台切换报The surface has been released错误;PhoneStateListener实现通话状态的监听
- Android 使用sharedpreferences、ACache缓存用户名和密码