1
漫画フォントが使用され、assetsフォルダから取得できるアプリケーションを1つ開発しています。今私はテキストを太字にしたいと思います。だから私は単純に使用します。テキストフォントスタイルが表示されない
Typeface face=Typeface.createFromAsset(this.getAssets(), "fonts/comic.TTF");
la = (TextView) findViewById(R.id.la);
la.setText("Dog");
la.setTextAppearance(getApplicationContext(),R.style.boldText);
la.setTypeface(face);
string.xmlを
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, timerTest!</string>
<string name="app_name">timerTest</string>
<style name="boldText">
<item name="android:textStyle">bold</item>
</style>
</resources>
私は適切に取得するが、大胆なスタイルはtext
私たちがカスタムフォントを使用しているときは、どんなフォントスタイルも使用できないと思います... –