How to change one span type to another in Android?
问题 I would like to take all the spans of one type in a CharSequence and convert them to a different type. For example, convert all the bold spans to underline spans: How would I do that? (This was a problem I was facing today, and since I have solved it now, I am adding a Q&A pair here. My answer is below.) 回答1: How to change spans from one type to another In order change the spans, you need to do the following things Get all the spans of the desired type by using getSpans() Find the range of