How to set TextView textStyle such as bold, italic
Programmatically:
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); // for Bold and Italic
XML:
You can set Directly in XML file in <TextView />
like:
android:textStyle="normal"android:textStyle="normal|bold"android:textStyle="normal|italic"android:textStyle="bold"android:textStyle="bold|italic"