Android Question Select an image from designer

Sergio Haurat

Active Member
Licensed User
Longtime User
How I can change at run time, some of the images previously loaded from the designer in the Layout?.

I want to select depending on the location, correct the image.

Code: Copy
'Example
Dim lmLocation As LocationManager
Dim gpsLocation As GPS
Dim ivSingal As ImageView

lmLocation.Initialize("lm")
gpsLocation.Initialize("gps")

If gpsLocation.GPSEnabled Then
  lmLocation.requestGPSLocation
  ivSingal.Bitmap = Load[imageonDesigner]("gps.png")
Else
  lmLocation.requestMobileLocation
  ivSingal.Bitmap = Load[imageonDesigner]("network.png")
End If

Load[imageonDesigner] is the function that I can not find in the documentation
 
It does not work, I did what you told me and does not update the image in the ImageView also verified that the filename is correct.
File.DirAssets is the Files folder in the project?
 
Upvote 0
yes
 
Upvote 0
The files are there, the names are correct, I have in case sensitive ... I do not know what can be happening. I put the project file in the post in case anyone has the time and desire to help me.
 

Attachments

Upvote 0
Nothing, just do not load the image. The Bitmap is black in the ImageView. You can try. The project uses the following libraries
b4aZXing (1.50)
Core (3.21)
GoogleMaps (1.01)
GoogleMapsExtras (1.71)
GPS (1.20)
LocationManager (1.10)
XmlSax (1.11)

Not all libraries are in use at this time
 
Upvote 0
Back
Top