I'm working on an application with multi-language support and I'm reloading my activity after changing app's language with this part of code in my settings fragment. (Unfortunately I can not use recreate()
method to reload the activity)
activity.finish();
activity.overridePendingTransition(0, 0);
startActivity(activity.getIntent().putExtra("FromSettings", true));
activity.overridePendingTransition(0, 0);
The problem with this approach is that the activity's fragments back stack gets removed and I can no longer go back to fragments before my settings fragment.
How can i maintain fragments back stack when reloading the activity?