By default, if the user changes the display language of their device while my app is running, Android will destroy then recreate the Activity. It does this to be sure my app is correctly using the latest settings.
I can override this behaviour by adding locale
to the configChanges
attribute in the manifest. Then when the user changes language, I will only get a callback to onConfigChanged()
rather than a full restart. However the documentation says I should "retrieve all resources" again:
All of these configuration changes can impact the resource values seen by the application. Therefore, when onConfigurationChanged() is called, it will generally be necessary to again retrieve all resources (including view layouts, drawables, and so on) to correctly handle the change.
My question is, is this really true for locale changes? If I have a hypothetical app that never makes use of the user's language settings at all, and renders only graphics, using a GLSurfaceView, is it safe to just ignore this event? If so, can you back that up with documentation?
Ignoring the event seems to function correctly, and it doesn't make much sense to recreate the view when I'm not making any use of the locale anyway, but I want to be sure I'm not introducing some subtle bugs.
Any infomation much appreciated.