I’ve created a Spanned object that displays an image along with some text.
Is it possible to get that imageView object so I could set it’s background?
I’ve created a Spanned object that displays an image along with some text. Is
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no
ImageViewobject, so you cannot get it.If you have an
ImageSpan— either that you added yourself directly or via something like an<img>tag in HTML you parsed withHtml.fromHtml()— you can get at theDrawablefor the image. However, that is directly rendered to the canvas, not by way of anImageViewwidget.You can wrap the
ImageSpanin aBackgroundColorSpan. Or, make sure that your image has the proper background already (e.g., use aLayerListDrawable).