Android:在应用程序本身更改Locale不会影响第一次运行



我使用下面的代码

Locale locale = new Locale("ar");Locale.setDefault(locale);Configuration config = new Configuration();config.locale = locale;context.getResources().updateConfiguration(config, context.getResources().getDisplayMetrics())

在我的主活动setContentView之前,但第一次运行的应用程序,它出现在设备本地,当我旋转应用程序,它出现在选定的语言。你能告诉我我错在哪里吗?

创建启动画面

最新更新