TextView Formatting

  • Replies:5
  • OpenNot stickiedAnswered
  • Forum posts: 71

Aug 19, 2016 11:04:41 AM via Website

How to add text format like bold, italics , strong in textView???

  • Forum posts: 71

Sep 23, 2016 2:25:19 PM via Website

Thanks..

  • Forum posts: 2

Sep 27, 2016 8:18:39 AM via Website

more easy if you use on XML,

android:textStyle="bold"

  • Forum posts: 11

Oct 1, 2016 5:56:50 AM via Website

If you need more complex formating to do from code use SpannableString
SpannableString text = new SpannableString(textToColor);
ForegroundColorSpan colorSpan = new ForegroundColorSpan(color);
text.setSpan(colorSpan, 0, text.length(), 0);`

here text color is changed.