Unable to change language in Oreo
I'm trying to use Arabic and English in my app. Its working fine on devices running on nougat or below. But it's not working on oreo devices. Is there some new code requirement in API 26? I am using the Code below. public void changeLanguage(Context context, String language) { Locale locale = new Locale(language); Locale.setDefault(locale); Configuration config = context.getResources().getConfiguration(); config.setLocale(locale); context.createConfigurationContext(config); context.getResources().updateConfiguration(config, context.getResources().getDisplayMetrics()); } and I'm passing "en"