As already requested by yiankos1, I too would like to capture the click events of each image. As indicated by Erel BitmapsAsync Grid specific image click event
I created an event for each Image, unfortunately the only thing I can get is the click on the panel but not the one related to the image, how to do it?
Thanks
As already requested by yiankos1, I too would like to capture the click events of each image. As indicated by Erel BitmapsAsync Grid specific image click event
I created an event for each Image, unfortunately the only thing I can get is the click on the panel but not the one related to the image, how to do it?
Thanks
Questo è il mio primo messaggio Come già richiesto da yiankos1, anche io vorrei catturare gli eventi click di ogni immagine. come indicato da Erel BitmapsAsync Grid specific image click event è necessario aggiungere l'evento click per ogni immagine del layout item. Ora nel designer ad ogni...
1. Your question has nothing to do with BitmapsAsync. BitmapsAsync is just responsible for loading bitmaps.
2. Don't use BitmapsAsync. Use SimpleMediaManager instead.
A modified version of SMM_Example2 is attached. It handles the click event (B4A only - should be trivial to make same changes in layout in B4J and B4i).
1. Your question has nothing to do with BitmapsAsync. BitmapsAsync is just responsible for loading bitmaps.
2. Don't use BitmapsAsync. Use SimpleMediaManager instead.
A modified version of SMM_Example2 is attached. It handles the click event (B4A only - should be trivial to make same changes in layout in B4J and B4i).
Considering that the bread in B4J, unlike the B4A panel does not have the click event, I used this code that works. Is there a better way? If no one answers then it means this is the only way.
Added pane click event in B4J:
#if B4A
Private Sub pnlImage_Click
Dim ImageIndex As Int = Sender.As(B4XView).Tag
Log($"Clicked on image: ${ImageIndex}"$)
End Sub
#else
Private Sub pnlImage_MouseClicked (EventData As MouseEvent)
Dim ImageIndex As Int = Sender.As(B4XView).Tag
Log($"Clicked on image: ${ImageIndex}"$)
End Sub
#end if
#if B4A
Private Sub pnlImage_Click
#else if B4J
Private Sub pnlImage_MouseClicked (EventData As MouseEvent)
#end if
Dim ImageIndex As Int = Sender.As(B4XView).Tag
Log($"Clicked on image: ${ImageIndex}"$)
End Sub