TeodorKolev TeodorKolev - 5 months ago 31
Android Question

Android rtl support without reload Activity

Is it possible to turn rtl support on without reload activity. I am using detach and attach fragments and properties are translated, but rtl direction of elements works only if I reload or

recreate()
my activity. Is that possible somehow?

Answer

You can try using View.setLayoutDirection() to manually set a layout direction. Be aware the layout direction is considered a configuration change and there may be resources qualified based on layout direction, and it's better to let the system go through its normal process in order to pick up these resources.