After the screen rotation, the language of my application will be changed

后端 未结 3 1532
伪装坚强ぢ
伪装坚强ぢ 2021-02-13 17:58

I have created a bilingual (having two languages) android application. I have inserted my resource strings in two files:

For Persian language (default)
values/st         


        
3条回答
  •  逝去的感伤
    2021-02-13 18:30

    I don't exactly understand what you are trying to do. But in general you don't have to manage the language of the app. Android will automatically pick the phone language if available and in any other case bring up a dialog to pick the language.

    If you do want to set language independent from that with your code - which I would not recommend - then there is probably a problem with your lifecycle preventing your code from being run again after an orientation change. I can help you with that if you post more of your code.

提交回复
热议问题