TeodorKolev TeodorKolev - 1 year ago 119
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

my activity. Is that possible somehow?

Answer Source

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.