BackgroundColorSpan adjust height or add a padding to it
问题 I have an app where I am displaying multiple lines, and multiple paragraphs, of formatted text in a TextView . I am using SpannableStringBuilder for this purpose. One of the things I want to do here is to be able to highlight the text. Now I have tried using BackgroundColorSpan , but in this case, the background on the text covers the complete line-height. I want it to cover only the text instead. There seems to be no apparent way to set a vertical padding or height on this span. Just the