How to set TextView
style (bold ot italic) with in Java and without using XML layout?
In other words I need to write android:textStyle
with Java.
转载于:https://stackoverflow.com/questions/6200533/set-textview-style-bold-or-italic
How to set TextView
style (bold ot italic) with in Java and without using XML layout?
In other words I need to write android:textStyle
with Java.
转载于:https://stackoverflow.com/questions/6200533/set-textview-style-bold-or-italic
textView.setTypeface(null, Typeface.BOLD_ITALIC);
textView.setTypeface(null, Typeface.BOLD);
textView.setTypeface(null, Typeface.ITALIC);
textView.setTypeface(null, Typeface.NORMAL);
To keep the previous typeface
textView.setTypeface(textView.getTypeface(), Typeface.BOLD_ITALIC)