Closed yogurtearl closed 10 years ago
I just tried this approach and Paint#measureText(String, int, int)
didn't properly measure the widths of CharSequences
with Spannables
(Html.fromHtml("<b>test</b>")
).
Would you know of another solution?
Should be fixed in 0.2.0
Right now, you are calling
This makes AutoFitTextView not render Spannables correctly.
Instead, just do:
You can just use the CharSequence everywhere, e.g.:
Also, the StaticLayout constructor takes a CharSequence