JohnC Expert Licensed User Longtime User May 17, 2018 #1 I keep seeing this routine in some posts, but I am unable to figure out where I can get a copy of the code for it: B4X: BitmapToBitmapDrawable(LoadBitmap(File.DirAssets, "test.png")) Does anyone know where this routine is?
I keep seeing this routine in some posts, but I am unable to figure out where I can get a copy of the code for it: B4X: BitmapToBitmapDrawable(LoadBitmap(File.DirAssets, "test.png")) Does anyone know where this routine is?
R Roycefer Well-Known Member Licensed User Longtime User May 17, 2018 #2 You can make your own in a few lines. A BitmapDrawable can be initialized with a Bitmap as the parameter. Upvote 0
You can make your own in a few lines. A BitmapDrawable can be initialized with a Bitmap as the parameter.
Peter Simpson Expert Licensed User Longtime User May 17, 2018 #3 Here you go. B4X: Sub BitmapToBitmapDrawable(BMD As Bitmap) As BitmapDrawable Dim BD As BitmapDrawable BD.Initialize(BMD) Return BD End Sub Enjoy... Upvote 0
Here you go. B4X: Sub BitmapToBitmapDrawable(BMD As Bitmap) As BitmapDrawable Dim BD As BitmapDrawable BD.Initialize(BMD) Return BD End Sub Enjoy...