public class MyApplication extends Application { @Override protected void attachBaseContext(Context base) { Resources res = base.getResources(); Locale locale = new Locale("en"); Locale.setDefault(locale); Configuration config = new Configuration(); config.locale = locale; res.updateConfiguration(config, res.getDisplayMetrics()); super.attachBaseContext(base); } }
Support layout mirroring
<manifest> <application . . . android:supportsRtl="false" tools:replace="android:supportsRtl" > </application> </manifest>
References
https://stackoverflow.com/questions/37894163/is-there-a-android-attribute-to-disable-locale-change-in-my-app/
https://stackoverflow.com/questions/11013904/disable-localization-in-android-application
https://stackoverflow.com/questions/26450489/disable-automatic-layout-change-on-android