There are problems with tabbar translation along with fragments in the application. At the moment, I only translate the contents of the fragments (when changing languages in the settings). I will explain that in my tabbar, in addition to the icons, there are the names of the fragments, by clicking on which I turn into fragments. But when changing the language in the application, the tabbar changes the language only if I kill the application and restart again. Therefore, it would be nice to update the tabbar without leaving the application.
I decided to redraw the activation elements by implementing the method:
override fun onConfigurationChanged(newConfig: Configuration?) { super.onConfigurationChanged(newConfig) invalidate() Log.d("onConfigurationChanged", "onConfigurationChanged") } And also added a parameter in AndroidManifest.xml for locale:
android:configChanges="locale|layoutDirection" But in the logs the method is still not used.