TextView textStyle 运行时改变字体粗细

Programmatically: Run time

You can do programmatically using setTypeface():

textView.setTypeface(null, Typeface.NORMAL);      // for Normal TexttextView.setTypeface(null, Typeface.BOLD);        // for Bold onlytextView.setTypeface(null, Typeface.ITALIC);      // for ItalictextView.setTypeface(null, Typeface.BOLD_ITALIC);

你可能感兴趣的:(TextView textStyle 运行时改变字体粗细)