Assigned
Status Update
Comments
mo...@google.com <mo...@google.com>
ri...@google.com <ri...@google.com>
go...@google.com <go...@google.com> #2
The difference in behavior occurs because Android 13 introduced the new
Although a new framework API cannot be added for previous versions of android, backwards compatibility was added in AndroidX by using the AppCompatDelegate to wrap the Activity's properties. Because the AppCompatDelegate's scope is limited to the activity, accessing the raw resources via the context does indeed still yield a result in the system language.
fa...@gmail.com <fa...@gmail.com> #3
Thanks for the reply, but what would be the solution to get raw resources with the correct locale after LocaleManager#setApplicationLocales?
sh...@miniclip.com <sh...@miniclip.com> #4
Any update on this?
Description
Component used: androidx.appcompat:appcompat:1.6.0-rc01 Version used: androidx.appcompat:appcompat:1.6.0-rc01 Devices/Android versions reproduced on: All android devices on versions < Android 13.
When I use
AppCompatDelegate.setApplicationLocales
to switch app locale, the locale indeed changes with all UI string resources changed to the correct locale. The locale is also persisted across app launches as I've addedAppLocalesMetadataHolderService
in AppManifest.xml.However, I've noticed that when trying to access
R.raw.xxx
resources, it always follows system locale instead of the in-app locale. This issue is however not reproducible on Android 13.