Android Question Changing Designer ImageView Image from code

Michael Carroll

Member
Licensed User
Longtime User
If I add an ImageView with an image in the Designer, is there a convenient way to to change the image later from B4A code or how could I go about doing this? Sorry, newbie question I'm afraid.
 

klaus

Expert
Licensed User
Longtime User
ImageView1.Bitmap = LoadBitmap(DirName, FileName)
or
ImageView1.Bitmap = LoadBitmapResize(DirName, FileName, Width, Height, KeepAspectRatio)
or
ImageView1.Bitmap = LoadBitmapSample(DirName, FileName, MaxWidth, MaxHeight
 
Upvote 0
Top