我的应用程序使用语音到文本识别,如果我更改设备语言,我的应用程序无法正常工作 . 我想在我的应用程序中默认使用英语 . 我怎样才能做到这一点?
Locale myLocale; myLocale = new Locale("en"); Locale.setDefault(myLocale); android.content.res.Configuration config = new android.content.res.Configuration(); config.locale = myLocale; getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());
1 回答