Android Local语言设置
(2013-11-21 16:07:24) 标签: android语言localconfiguration对象 | 分类: ANDROID |
1 首先获取Configuration 类:
2 设置config的local属性
3 设置config属性
4 设置好config属性后,需要更新
Intent intent =
new
Intent();
intent.setClass(
this
, MainActivity.
class
);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
this
.startActivity(intent);
-------------------------------------------------------------------------------
- <</span>activity
-
android:name=".MainActivity" -
android:label="@string/title_activity_main" -
android:configChanges="locale" > //捕捉local的变化 -
<</span>intent-filter> -
<</span>action android:name="android.intent.action.MAIN" /> -
<</span>category android:name="android.intent.category.LAUNCHER" /> -
</</span>intent-filter> - </</span>activity>
转自:http://blog.sina.com.cn/s/blog_6b936f150101gxnv.html