It appears that the layout direction of all GUI elements is now controlled by the system language. When it is a right-to-left one, all menus, dialogs, message boxes etc' appear from right to left. This is horrible.
The app has a localizing feature built in("choose your country) How can I make the app localization govern the GUI of the app rather than the devices system language ?
There is a long journey ahead of you .. you will need to detect device settings in your 'Application' class and then enforce specific locales and layout directions in code .. You will then need to handle onConfigurationChanged for every activity to handle 'layoutdirection|locale' configuration change event and handle those yourself by reloading your activities so that they pick the new runtime changes in order to fetch the correct resources from layout folder on the fly without having to close and reopen the app. To be honest, it's a buggy ride especially the reload activities part which will produce some weird behavior and bugs .. but it's doable eventually ..
Check this out for further info :
https://github.com/aleung/RunningCadence/blob/master/RunningCadence/src/leoliang/runningcadence/Application.java
https://github.com/aleung/RunningCadence/blob/master/RunningCadence/src/leoliang/runningcadence/PreferenceActivity.java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With