如何显示Android应用韩文单词 [英] How to display Korean Words in android app

查看:547
本文介绍了如何显示Android应用韩文单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在某些Android手机,Android应用中显示朝鲜话的时候不装韩文字体,它们不能显示读取。如何处理在Android应用这样的情况?有没有解决这样的问题,一个简便的方法?我必须安装的应用程序韩文字体?我是在Android上首发,我是一个有点困惑,如果所有的韩国字符串带统一code codeD,不宜它们显示可读性?

On some android cellphones, which do not install Korean fonts, when displaying Korean words in an android app, they can't be displayed readable. How to handle such situation in android apps? Is there a convenient way to solve such issue? Must my app install a Korean font? I am a starter on android, I am a little bit confused, if all the Korean strings are encoded with Unicode, shouldn't they be displayed readable?

由于一吨。

推荐答案

您可能是正确的有关字体。当你有一个字符串包含韩文字符,它不一定所有的字体类型的支持。如果你想确保,那些字符串得到正常显示,使用自己的字体。 这里你可以找到支持韩国一些字体类型。

You might be right about the font. When you have a String containing Korean characters, it is not necessarily supported by all font types. If you want to make sure, that those Strings get displayed properly, use your own font. Here you can find some font types that support Korean.

在<一个href=\"http://stackoverflow.com/questions/3424165/can-i-embed-a-custom-font-in-an-android-application\">another线程SO ,他们讨论了如何在包括Android的自己的字体。基本上有下列步骤操作:

In another thread on SO, they discussed how to include your own font in Android. Basically there are these steps:


  1. 拷贝字体到项目的文件夹( myProject的/资产/字体

  2. 加载字体在您的项目

  3. 设置一些文本使用的字体

示例:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    Typeface myTypeFace = Typeface.createFromAsset(getAssets(), "fonts/myKoreanFont.ttf");      // that's how you load your font
    TextView myTextView = (TextView) findViewById(R.id.myKoreanText);
    myTextView.setTypeface(myTypeFace);        // that's how you use your font
}

下面是另一个实例教程如何使用的字体 。但该技术基本上是相同的。

Here is another example tutorial on how to use fonts. But the technique is basically the same.

这篇关于如何显示Android应用韩文单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆