0

I would like to use a drawable I loaded from a resource to use as a resource again. I went that way because I needed to set the bounds of that drawable.

Drawable smiley = d.Resources.GetDrawable(Resource.Drawable.emoji_1f600);
smiley.SetBounds(0, 0, orig.LineHeight, orig.LineHeight);

//Can't pass smiley like this, an int is expected.
var imageSpan = new ImageSpan(_activity, smiley);

1 Answer 1

1

You can use your drawable as a bitmap, as constructor ImageSpan(Context,Bitmap) exists:

How to convert a Drawable to a Bitmap?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.