ImageSpan alignment in TextView
android, textview
Solution
When you construct the ImageSpan, you can specify a vertical alignment, one of `ImageSpan.ALIGN_BOTTOM` or `ImageSpan.ALIGN_BASELINE`. I believe ImageSpan uses `ALIGN_BOTTOM` by default, so try a constructor that allows you to specify `ALIGN_BASELINE`.
Problem
I have a `TextView` which makes use of the `android:lineSpacingMultiplier` attribute to increase the spacing between lines, which works fine except for when I add an `ImageSpan` to the text. This causes the image to be aligned to the bottom of the space between lines, not the baseline of the text (as is specified when I create it). I tried using the `android:lineSpacingExtra` attribute, with some success, the image was still positioned lower than it should be, but not as much. Is there an alternate way of increasing the space between lines without messing up the vertical alignment of the `ImageSpan`?