Android Question B4XImageView check if image is loaded or empty

zabayin

Member
Licensed User
Longtime User
I want to check
Code Sample:
If B4XImageView1.Bitmap = Null Then

' ---- code here

End If

Unfortunately .. i can't found this easy one.
All I found methods are B4XImageView.Clear and not found solution in the forum.
regards ....
 

Andris

Active Member
Licensed User
Longtime User
I want to check
Code Sample:
If B4XImageView1.Bitmap = Null Then

' ---- code here

End If

Unfortunately .. i can't found this easy one.
All I found methods are B4XImageView.Clear and not found solution in the forum.
regards ....

When loading bitmaps into image views, how about setting the .Tag property of each image view to True or False?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Shouldn't it be the other way around? First check for initialization and then for null? I'm basing this on the assumption that lazy evaluation's in place.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Shouldn't it be the other way around?
No. If the Bitmap is not set it is Null.
You´ll get a Exception when trying to access the Bitmaps IsInitialized Method.
 
Upvote 0
Top