Forum Xamarin.Android

How to create Drawable from Bitmap?

igorkr_10igorkr_10 Member ✭✭✭✭
edited October 2020 in Xamarin.Android

I need to create Drawable from Bitmap.
I use the next code but this is obsolete.

private async Task<Drawable> CreateLeftDrawable()
        {
            return new BitmapDrawable(await Element.LeadingImageSource.GetBitmap(this.Context, new System.Threading.CancellationToken()));
        }

Is there any another way to get Drawable from Bitmap?

Tagged:

Best Answer

Answers

Sign In or Register to comment.