I would like to have a custom Spannable
class which somehow combines the behaviour of ImageSpan
, BackgroundColorSpan
and ClickableSpan
. So basically something like the labels or bubbles plus a click handler. Or in other words: I need to place an icon in front of a word and draw a custom background behind that word. I dived through ReceipentEditor
and other classes but couldn't find the ultimate hint yet.
I tried to accomblish this by extending DynamicDrawableSpan
but this would replace the text and I don't want to bother drawing the text manually. What would be the best way to implement such a custom Spannable
? Or is there a better way without using Spannables
? Any tips or hints are appreciated!