强制 Android 应用使用某个 Locale

String languageToLoad  = "de";
2 Locale locale = new Locale(languageToLoad);
3 Locale.setDefault(locale);
4 Configuration config = new Configuration();
5 config.locale = locale;
6 getBaseContext().getResources().updateConfiguration(config, null);


1 <activity
2   android:label="@string/app_name"
3   android:name=".Dex"
4   android:configChanges="locale">

你可能感兴趣的:(android,String,null)