Display Japanese-style Chinese letters instead of Chinese-style Chinese letters when the system language is English

折月煮酒 提交于 2019-12-08 09:01:44

问题


My question is similar to this (Displaying japanese instead of chinese in a textview), but a little bit different. The proposed solution is embedding a Japanese font in the app.

But I would not like to embed a Japanese font in the app, because it will increase the app size and I would have to buy an expensive font licence. It seems the Android emulator (Android 8.1) already has a Japanese font. How to use it, instead of embedding a font?

I mean, when I changed the system language to Japanese, it was like this:

But when the system language is English, it was like this (notice the third and fourth letters):

In case if you are wondering why I want to display them in Japanese style, I want to make a Japanese learning app, so it must display Japanese-style Chinese letters no matter what the system language is.


回答1:


Since API 17 you can use TextView.setTextLocale

kanji.setTextLocale(Locale.JAPAN);


来源:https://stackoverflow.com/questions/49277987/display-japanese-style-chinese-letters-instead-of-chinese-style-chinese-letters

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!