iOS Question Class with image without event click

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
If I create a imageview in a page inside a
Application_Start
like that:
B4X:
Dim imgPullTab As ImageView
imgPullTab.Initialize("imgPullTab")
imgPullTab.Bitmap = LoadBitmap(File.DirAssets,"test.png")
Page1.RootPanel.AddView(imgPullTab,0,0,100dip,100dip)
I can get the click event in:
B4X:
Sub imgPullTab_Click
End Sub

But If I put this same piece of code in a class (imageview and click event), is not firing.....

Anybody knows why?

And Yes, my class receive the Page as parameter, like that:
B4X:
Public Sub Initialize(vCallback As Object, ev As String,Page As Page)
CallBack = vCallback
Evt = ev

Dim imgPullTab As ImageView
imgPullTab.Initialize("imgPullTab")
imgPullTab.Bitmap = LoadBitmap(File.DirAssets,"actionbarpulltab.png")
imgPullTab.BringToFront

Page.RootPanel.AddView(imgPullTab,0,0,100dip,100dip)
End Sub

Sub imgPullTab_Click

'**** NOT FIRING
End Sub


OBS: The imageview appears normally, but event not firing

Thanks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…