android:configChanges=”locale”
16lz
2021-01-23
在android 2.0的平台上,如果你使用了强制语言转换,你会看到屏幕在不断的闪烁。因为这个Activity在不断的执行onCreate();在Logcat上你 也会看到如下错误:"something wrong here, didn't expect * to be resumed android".
解决办法是:
在manifest 中添加android:configChanges=”locale”这个属性。
[xml]<activity android:name=”.Main” android:configChanges=”locale” android:label=”@string/app_name” />[/xml]
低于2.0的sdk没有这个问题。
http://almondmendoza.com/2009/01/28/force-localize-an-application-on-android/
解决办法是:
在manifest 中添加android:configChanges=”locale”这个属性。
[xml]<activity android:name=”.Main” android:configChanges=”locale” android:label=”@string/app_name” />[/xml]
低于2.0的sdk没有这个问题。
http://almondmendoza.com/2009/01/28/force-localize-an-application-on-android/
更多相关文章
- Android开发中布局属性的使用汇总
- android学习——EditText的属性
- Android EditText通过imeOptions属性控制软键盘的回车键变化:回车
- android:installLocation这个属性
- Android ListView几个特别的属性
- Android屏幕常亮防息屏
- Android 属性动画的原理分析