就在最近的context.getResources().updateConfiguration()已在Android API 25中弃用,建议使用上下文.而是createConfigurationContext().
有谁知道createConfigurationContext如何用于覆盖android系统区域设置?
在此之前将通过以下方式完成:
Configuration config = getBaseContext().getResources().getConfiguration();
config.setLocale(locale);
context.getResources().updateConfiguration(config,
context.getResources().getDisplayMetrics());
Run Code Online (Sandbox Code Playgroud)