I have two typefaces and I would like to use Typeface1 for the titles and Typeface2 for the body.
Is there a way to do that? I can add tags around the title if that would help, like
Typeface typeface1 = Typeface.createFromAsset(getAssets(), "fonts/Typeface1.ttf");
Typeface typeface2 = Typeface.createFromAsset(getAssets(), "fonts/Typeface2.ttf");
textView.setText("<b>Title 1</b>\n" +
"Body 1\n" +
"<b>Title 2</b>\n" +
"Body 2\n" +
"<b>Title 3</b>\n" +
You need to use Html.fromHtml() to use HTML in your XML Strings. Simply referencing a String with HTML in your layout XML will not work.
This might work