While playing with localization on the Android for
my app I came upon an annoying bug.
It seems running on Motorola Milestone the fonts were getting smaller on each locale update.
I use the following code for locale changing (from
http://almondmendoza.com/2009/01/28/force-localize-an-application-on-android/):
String languageToLoad = "de";
Locale locale = new Locale(languageToLoad);
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config, null);
Also in the AndroidManifest.xml I have (without this entry you get "Something wrong here, didn't expect "mypackagename" to be resumed"):
<activity
android:label="@string/app_name"
android:name=".Dex"
android:configChanges="locale">
Here is how my screen should look like:
And here is how it was looking on Motorola Milestone.
After changing the Locale from Preferences the fonts keep gettting smaller and smaller
This was very annoying. I did not know exactly why this was happening.
More...