Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Android Things デバイスで漢字を使用すると、テキストが文字化けします。
漢字をサポートするフォントを選択する必要があります。
TextView myText = (TextView) findViewById(R.id.myText); myText.setTypeface(Typeface.createFromAsset(getAssets(), "DroidSans.ttf"));
DroidSans.tffファイルは、assets フォルダーに配置する必要があります。
私はこの方法で解決します。
TextView txtHello = (TextView)findViewById(R.id.txt_hello); txtHello.setTypeface(ResourceCompat.getFont(context, R.font.nanum);