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