Android Question [B4X] BitmapsAsync Grid specific image click event


Active Member
Licensed User
Hello team,

I am trying to implement @Erel 's grid at my project. I would like to know if i can get a specific B4XImageView click event, in order to get data "behind" that image.

To conclude there is no click event for B4XImageView. Can it be added?

Thank you for your time.
Last edited:


Active Member
Licensed User
Handle the click events of the four panels.
Thank you for your answer Erel.
I am testing your example and i have to admin that is very responsive and quick loading.

I have a question about my case.

Sub CustomListView1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
    For Each i As Int In PCLV.VisibleRangeChanged(FirstIndex, LastIndex)
        Dim item As CLVItem = CustomListView1.GetRawListItem(i)
        Dim pnl As B4XView = xui.CreatePanel("")
        item.Panel.AddView(pnl, 0, 0, item.Panel.Width, item.Panel.Height)
        Dim data As MyImageData = item.Value
        'Create the item layout
        For x = 0 To 3
            pnl.GetView(x).GetView(1).Text = data.IndexOfFirstImage + x
            DownloadAndSetImage($"${data.IndexOfFirstImage + x}/200/300.jpg"$, pnl.GetView(x).GetView(0).Tag) '
End Sub

As we see at your example, you get the index of first image and you fetching this and three more images. It's ok, because you want to fetch, lets say 300 photos in order.

Now, my question is that if i have a list of imageNames that i want to fetch from a server(not numbers from 1 to 300) how this could be done?

Thank you for your time.
Upvote 0