0

I am using ImageSpan to render custom emoji in line with my text, and it works great. I use setBounds on the Drawable to match the font metrics so that it ends up the right size with the text.

But when I have an AnimatedImageDrawable it renders at the intrinsic size no matter what I set the bounds to, taking up more space that it should, overlapping with nearby text, and getting cut off by the bottom of the view. It's not completely ignoring the bounds because I can get it to move around based on changes I make there, but it never gets smaller. This happens no matter if the animation is started or not.

What can I do to make an ImageSpan built from an AnimatedImageDrawable scale down the drawable properly to fit in line with my text?

singpolyma
  • 10,999
  • 5
  • 47
  • 71

0 Answers0