antoniomarin
03/25/2020, 10:21 AMonConfigurationChanged
?
I’m dealing with the locales, and when I do update it manually I need to somehow recreate
the views, recreating activity will kick user out and he will need to re-log so I would rather try to avoid that.
I’m also trying with the following but it doesn’t work completely which is weird in fairness:
val res = resources
val configuration = res.configuration
configuration.setLocale(Locale(preferences.userLocale))
onConfigurationChanged(configuration)
wasyl
03/25/2020, 10:28 AMonConfigurationChanged
get called in activity when configuration changed, but without recreating entire activity?antoniomarin
03/25/2020, 10:33 AMconfigurationChanges
. For example. I’m gonna setup new Locale and then enter split screen mode and upon exiting it my Locale changes will be reflected on the app.
Activity won’t restart.wasyl
03/25/2020, 12:04 PMandroid:configChanges
attribute in the manifest, then for configuration changes enumerated there, activity won’t restartonConfigurationChanged
callback will be calledantoniomarin
03/25/2020, 5:27 PMvar orientation1: Int = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
var orientation: Int = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
requestedOrientation = orientation1 requestedOrientation = orientation
It does auto rotate and that way it does onConfigurationChange