简体   繁体   中英

Android localisation

After changing the language in the current activity when I press the back button in the action bar the language change is not reflected in the activity in the backstack. I am not understanding what's the issue? I googled a lot but couldn't find any solution. Please help me in solving this issue.

The changed language will only be reflected on activities created after the process of changing language, it will not even be reflected on the current visible activity unless you recreate it. Activities in the backstack are not recreated upon returning to them. You have to recreate them by calling recreate() .

Another work around is to override the back button in the current activity and make send intent to the activity you want by calling startActivity(intent) . This will create the activity.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM