[B4X] [XUI] Discoverable list with Images

Star-Dust

Expert
Licensed User
Longtime User
One problem that has often been addressed is the Image List when there are many elements. Because when the list is populated it seems to freeze and take a long time.

One solution adopted is the asynchronous method. It populates with the text, which occurs quickly and asynchronously the ImageView are added.
A second solution is to create the ImageView only when they reach the visible area. And when scrolling the list the ImageView that come out of the visual range are discarded (or destroyed).

For my latest App I wanted something new and different and I thought of a different solution.
I'll show you before I explain it.
Video1.gif


What flows are only the Views containedneo ilt esto and the information. ImageView are fixed. As the lists align with the ImageView the corresponding photos appear.

Obviously when you scroll through the list, the lines of the text always stop in correspondence with the images
 

LucaMs

Expert
Licensed User
Longtime User
Technically it can be a good solution but practically much less, as the user, right in cases like the one you published, looks first at the image and only after at the relative data.
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Thanks for the suggestion, even if the images in this case are local because they will be taken by the device.

The loadingIndicator is not inserted while waiting for the image to be loaded from the web, but is only used to wait for the list to finish scrolling.
It is a temporary solution, I am trying other solutions pending a new idea.

However, it might be a possibility to add asynchronous loading for any images uploaded from the web.
 

Star-Dust

Expert
Licensed User
Longtime User

Xfood

Expert
Licensed User
One problem that has often been addressed is the Image List when there are many elements. Because when the list is populated it seems to freeze and take a long time.

One solution adopted is the asynchronous method. It populates with the text, which occurs quickly and asynchronously the ImageView are added.
A second solution is to create the ImageView only when they reach the visible area. And when scrolling the list the ImageView that come out of the visual range are discarded (or destroyed).

For my latest App I wanted something new and different and I thought of a different solution.
I'll show you before I explain it.
View attachment 96884

What flows are only the Views containedneo ilt esto and the information. ImageView are fixed. As the lists align with the ImageView the corresponding photos appear.

Obviously when you scroll through the list, the lines of the text always stop in correspondence with the images
nice this example, you could share the source. thank you.
 

Star-Dust

Expert
Licensed User
Longtime User
I entered a filter field to narrow down the search and added the blur effect when the list scrolls

2.gif


nice this example, you could share the source. thank you.
You will have to content yourself with seeing the images, we are not in the Code Snippet section but Chit Chat section 😜😜😜
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
I added the ability to enable (or disable) a small animation.
N.B. This Custom View works on B4A, B4I, B4J. It does not work on B4R

Video3.gif
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
The view is starting to open the shape I wanted but it is not yet complete.
I added the possibility to see the articles in grid format.

Video4.gif
 

AnandGupta

Expert
Licensed User
Longtime User
We now have a clone of Erel in Star-Dust !
May the Force be with you !!

Thanks a lot 👍

Regards,

Anand
 

Xfood

Expert
Licensed User
cosi e come portare un bambino davanti ad una pasticceria / gelateria e dirgli:
Guarda che bei dolci al cioccolato, guarda che bei gelati.....
ma non puoi mangiarli....😭😭😭

Complimenti, hai fatto un ottimo lavoro @Star-Dust
 

Star-Dust

Expert
Licensed User
Longtime User
cosi e come portare un bambino davanti ad una pasticceria / gelateria e dirgli:
Guarda che bei dolci al cioccolato, guarda che bei gelati.....
ma non puoi mangiarli....😭😭😭

Complimenti, hai fatto un ottimo lavoro @Star-Dust
You have diabetes and high blood sugar, no pastries today
 
Top