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?
Try
return new BitmapDrawable( this.Context.Resources, await Element.LeadingImageSource.GetBitmap(this.Context, new System.Threading.CancellationToken()));
Refer to https://stackoverflow.com/a/9978952/8187800 .
Answers
Try
Refer to https://stackoverflow.com/a/9978952/8187800 .