IconMarginSpan has very few methods. Does the chooseHeight method have this effect? How can I change it to set DynamicDrawableSpan#ALIGN_BASELINE like DynamicDrawableSpan and ImageSpan so that the following text can wrap?
public void chooseHeight(CharSequence text, int start, int end,
int istartv, int v,
Paint.FontMetricsInt fm) {
if (end == ((Spanned) text).getSpanEnd(this)) {
int ht = mBitmap.getHeight();
int need = ht - (v + fm.descent - fm.ascent - istartv);
if (need > 0)
fm.descent += need;
need = ht - (v + fm.bottom - fm.top - istartv);
if (need > 0)
fm.bottom += need;
}
}
Add a space. . . . . . That’s it
Add a space. . . . . . That’s it