Android Question Pass Image to Second Activity using CallSubDelayed2

mangojack

Expert
Licensed User
Longtime User
I have not been able to locate any discussion / text hinting how do do this .

I would like to pass the contents of an ImageView to another Imageview loaded in a second Activity using CallSubDelayed2.

Main Activity ...
B4X:
ImageView1.Bitmap = LoadBitmap(File.DirInternal, "smiley.png")
   CallSubDelayed2(Activity2,"GetImageFromMain",ImageView1.Bitmap)

Second Activity ...
B4X:
Sub GetImageFromMain(image As Bitmap)
  
   ImageView2.Bitmap = image

End Sub

I have tried all combinations of referencing bitmaps,backgrounds etc.

Thanks
 

mangojack

Expert
Licensed User
Longtime User
I have solved the problem by loading the image to a Bitmap first and passing that as the CallSubDelayed2 argument.

B4X:
Dim  myBMP As  Bitmap
myBMP.Initialize(File.DirInternal, "smiley.png")
ImageView1.Bitmap = myBMP
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

mangojack

Expert
Licensed User
Longtime User
Talk about going round in circles .. lol I'm trying to help him ,who ends up helping me .. one way of spawning ' likes '
 
Upvote 0
Top