In Xamarin, ich habe die folgende Erweiterung erstellt locale on the fly zu ändern:NoSuchMethodError Ausnahme mit SetLocale
public static void ToEnglishLocale(this Activity activity)
{
Locale locale = new Locale("en-US");
Configuration config = new Configuration();
config.SetLocale(locale);
activity.BaseContext.Resources.UpdateConfiguration(config, activity.BaseContext.Resources.DisplayMetrics);
}
I API 15 mit folgenden Ausnahme ein und es nicht auf 15 API bin Targeting:
Unhandled Exception:
Java.Lang.NoSuchMethodError: no method with name='setLocale' signature='(Ljava/util/Locale;)V' in class Landroid/content/res/Configuration;
Gibt es eine andere "einheitliche" Möglichkeit, das Gebietsschema im laufenden Betrieb zu ändern? Danke!