のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

paint:setLocale

public void setTextLocale (Locale locale)

Added in API level 17
Set the text locale. The text locale affects how the text is drawn for some languages. For example, if the locale is CHINESE or CHINA, then the text renderer will prefer to draw text using a Chinese font. Likewise, if the locale is JAPANESE or JAPAN, then the text renderer will prefer to draw text using a Japanese font. This distinction is important because Chinese and Japanese text both use many of the same Unicode code points but their appearance is subtly different for each language. By default, the text locale is initialized to the system locale (as returned by getDefault()). This assumes that the text to be rendered will most likely be in the user's preferred language. If the actual language of the text is known, then it can be provided to the text renderer using this method. The text renderer may attempt to guess the language script based on the contents of the text to be drawn independent of the text locale here. Specifying the text locale just helps it do a better job in certain ambiguous cases

Parameters
locale the paint's locale value for drawing text, must not be null.