Возникла проблема при изменении языка приложения в Android 13 и 14.Android

Форум для тех, кто программирует под Android
Anonymous
Возникла проблема при изменении языка приложения в Android 13 и 14.

Сообщение Anonymous »

Я установил локальное приложение для Android через

Код: Выделить всё

fun setSystemLocale(context: Context): Context {
val locale = getCurrentLanguage().locale
Locale.setDefault(locale)
val configuration = Configuration(context.resources.configuration)
configuration.setLocale(locale)
configuration.setLayoutDirection(locale)
context.resources.updateConfiguration(configuration, context.resources.displayMetrics)
return context.createConfigurationContext(configuration)
}
установка локального приложения работает нормально в более ранних версиях (ниже Android 13), но на Android 13 и 14 иногда язык меняется частично, а иногда изменение языка не отражается.

Подробнее здесь: https://stackoverflow.com/questions/778 ... roid-13-14

Вернуться в «Android»