My application supports 4 different languages, two of them are written from right to left.
If I change the language on the Android system and then run the application, everything will be fine. I get a mirror layout (RTL), and even the navigation bar is mirrored.
My problem is that I have a button in the application for changing the language. To programmatically change the locale, I do this:
Locale locale = new Locale("ar")
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());
And then recreate the action:
this.recreate();
Activity is recreated from RTL, but the navigation bar retains the old style (not mirror):

Can I display the navigation bar programmatically?
EDIT (ADD IMAGES):
If I change the system language, everything works fine:

If I programmatically change the language, the navigation bar does not change:

source