The current implementation of per-app language selection relies on AppCompat to override the Activity Context on API < 33, which requires the Activity to extend AppCompatActivity. This is currently not the case, so language override doesn't work on these versions.
Make ZeMainActivity extend AppCompatActivity
Update ZeMainActivity theme to extend Theme.AppCompat.* which is required when extending AppCompatActivity
Add horizontal padding to the locales list, similar to the settings screen
Close the locales list upon selection, to make it explicit that the button click was taken into account
Move the language switching logic up to ZeBadgeViewModel, next to the theme switching logic.
How It Was Tested
Launch the app on API < 33
Open the slide menu and click on "Set language"
Select any language by clicking a button.
The menu will close and the new language will now be reflected correctly on all API versions.
Summary
The current implementation of per-app language selection relies on AppCompat to override the Activity
Context
on API < 33, which requires the Activity to extendAppCompatActivity
. This is currently not the case, so language override doesn't work on these versions.ZeMainActivity
extendAppCompatActivity
ZeMainActivity
theme to extendTheme.AppCompat.*
which is required when extendingAppCompatActivity
ZeBadgeViewModel
, next to the theme switching logic.How It Was Tested
The menu will close and the new language will now be reflected correctly on all API versions.