gpt4 book ai didi

java - 安卓 : changing Locale within the app itself does not affect the first run

转载 作者:行者123 更新时间:2023-11-30 11:48:37 26 4
gpt4 key购买 nike

我使用下面的代码

区域设置 locale = new Locale("ar");Locale.setDefault(locale);配置 config = new Configuration();config.locale = locale;context.getResources().updateConfiguration(配置,
context.getResources().getDisplayMetrics())

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

最佳答案

创建启动画面,我解决了我的问题。

关于java - 安卓 : changing Locale within the app itself does not affect the first run,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8700831/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com