The text becomes garbled when I use Chinese characters on Android Things device.
You have to select a font which supports the chinese characters:
TextView myText = (TextView) findViewById(R.id.myText); myText.setTypeface(Typeface.createFromAsset(getAssets(), "DroidSans.ttf"));
The DroidSans.tff file needs to be placed in the assets folder.
I solve this way.
TextView txtHello = (TextView)findViewById(R.id.txt_hello); txtHello.setTypeface(ResourceCompat.getFont(context, R.font.nanum);
You have to select a font which supports the chinese characters:
The DroidSans.tff file needs to be placed in the assets folder.