`
guojianhui0906
  • 浏览: 46127 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Android 中Locale,auto-rotate状态的获取

阅读更多
1. 得到当前locale:

Context.getResources().getConfiguration.locale;


2. 是否开启了auto-rotate:(这个和具体设备似乎也有关系,不确定是否通用)

import android.provider.Settings;
mAutoRotateSwitch = (Settings.System.getInt(this.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 0) == 1);
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics