Android Question Image Popup

Hi!
I have image stored to ImageView (taken by camera or selected from gallery).
I would like to just popup this image (bitmap) on click on imageview.
What is the best way to do it? Should I create new layout and pass bitmap to it, or is there some way to do it with toast message?
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Tnx!
I managed to do it like below:

B4X:
Private Sub ImageView1_Click       
    Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, 300dip, 500dip) 'set the content size
    p.LoadLayout("ImagePopup")
    imgPopup.Bitmap = ImageView1.bitmap
    Dim rs As ResumableSub = dialog.ShowCustom (p,  "Ok", "", "")
    Wait For (rs) Complete (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        'do something
    End If
End Sub

If I have three ImageView objects in a row, how should I arange it to be streched equaly from left to right. See the problem in attached image:
 

Attachments

  • Screenshot_20240226-141813.png
    Screenshot_20240226-141813.png
    38.7 KB · Views: 107
Upvote 0
Top