Bitmap Help

Omar

Member
Licensed User
Longtime User
Hello,

I have been facing an issue when I try to load a bitmap into an ImageView, I am using the following code:


I have already added the ImageView2 in through the designer, but all I get is a blank white box.

Will appreciate any help with this. Thank you.
 

klaus

Expert
Licensed User
Longtime User
You should use:
B4X:
If Val(Rating) >= 8.5 Then
ImageView2[COLOR=red].Bitmap[/COLOR] = LoadBitmap(File.DirAssets, "rating45.gif")
Else
ImageView2[COLOR=red].Bitmap[/COLOR] = LoadBitmap(File.DirAssets, "rating40.gif")
End If

ImageView2 is the name of the view.
ImageView2.Bitmap is the parameter.

Best regards.
 
Upvote 0

Omar

Member
Licensed User
Longtime User
Thank you very much Klaus. That was exactly it.



 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…