1

I am trying to use a for loop to add formatting using SpannableStringBuild from strings in a list, however in the TextView, despite all the strings having been appended, only the string appended in the initial for loop keeps its formatting.

Tamzid
  • 47
  • 6

1 Answers1

2

As we can't reuse instance of formatting style twice, all that had to be done was move the declaration of the formatting such as UnderlineSpan underlineSpan = new UnderlineSpan(); inside the for loop.

Tamzid
  • 47
  • 6