我想为单个文本视图设置区域设置。这意味着只有该文本视图将以另一种语言显示(在我的例子中是法语),但不幸的是它没有起作用。虽然我没有收到错误,但什么也没有发生。
Locale locale = new Locale("fr");
maintext.setTextLocale(locale);
tried updating confguirations , same thing . Nothing changes .
Locale locale = new Locale("fr");
Configuration config = new Configuration();
config.locale = locale;
getActivity().getResources().updateConfiguration(config,
getActivity().getResources().getDisplayMetrics());
maintext.setTextLocale(locale);
我在普通的活动中尝试过这样做,结果完全没有问题。