0

I faced this problem.

I'm building an app with two languages supported English and Hebrew. I created a font-iw folder for Hebrew and added fonts in it. And I changed locale while app running. Accomplished it through custom context wrapper and override attachBaseContext(). Exactly, I created activity and my app based on fragment navigation. So one activity and many fragments on it. Texts work fine, and if restart the app it works fine, but the problem is the font not changed in runtime. I've read many posts but couldn't find any solution.

Anyone can help me? Thanks.

  • 3
    Does this answer your question? [How to refresh activity after changing language (Locale) inside application](https://stackoverflow.com/questions/8049207/how-to-refresh-activity-after-changing-language-locale-inside-application) – avocadoLambda Jun 21 '20 at 19:36
  • If that post _doesn't_ answer your question, please explain why it doesn't. – Ryan M Jun 21 '20 at 20:10
  • I followed the blue marked answer and it works fine. But I mean the font not changed. In my case, I have several fonts for each Hebrew and English. When I change language from English to Hebrew, everything is changed as well, but font is not. And then, I restart the app, the font changed correctly. But when I changed Hebrew to English, it's not changed. So I had to restart the app. I wish a solution without restart app. Thanks. – MingZhe Qiu Jun 22 '20 at 06:12

0 Answers0