android-layout-direction

Changing app locale sometimes doesn't change direction of layouts

♀尐吖头ヾ 提交于 2020-07-23 07:34:19
问题 I'm changing locale of my app programmatically using the following method. It works fine but when I start an already existing singleTask activity using Intent.FLAG_ACTIVITY_CLEAR_TOP flag. Then application loses the layout direction but translation is correct. For example, if application language is Arabic then all views direction is changed to English locale (left-to-right). What could be the reason? I'm calling following method in attachBaseContext of BaseActivity and Application class.

Changing app locale sometimes doesn't change direction of layouts

萝らか妹 提交于 2020-07-23 07:33:16
问题 I'm changing locale of my app programmatically using the following method. It works fine but when I start an already existing singleTask activity using Intent.FLAG_ACTIVITY_CLEAR_TOP flag. Then application loses the layout direction but translation is correct. For example, if application language is Arabic then all views direction is changed to English locale (left-to-right). What could be the reason? I'm calling following method in attachBaseContext of BaseActivity and Application class.

Changing app locale sometimes doesn't change direction of layouts

泪湿孤枕 提交于 2020-07-23 07:32:08
问题 I'm changing locale of my app programmatically using the following method. It works fine but when I start an already existing singleTask activity using Intent.FLAG_ACTIVITY_CLEAR_TOP flag. Then application loses the layout direction but translation is correct. For example, if application language is Arabic then all views direction is changed to English locale (left-to-right). What could be the reason? I'm calling following method in attachBaseContext of BaseActivity and Application class.