I want to add to a listview of countries their own flags to do this I tried:
The list is correctly created, but it is very slow scroll or stuck.
Do You know why? Is there a better way to do this?
FlagList.aia (5.1 KB)
Thank You very much
You are issuing a lot of image requests over a short amount of time to that web site.
It's the web equivalent of backing up a dump truck to a buffet.
Here is a less greedy alternative:
This tutorial is intended for people who need to display a heavily customized scrollable window into a large table. It can also be used as a CardView.
(I needed a pithy title, and "The Elder Scrolls" was taken.)
My sample subject area for my data is the historical or current set of legislators in the US Congress, both Representatives and Senators, with photos (where available.)
Credits for the source data:
photos from https://…
It's because you are downloading the images directly into the List. Downloading them all as a one-off operation on the first-ever run of the App will help, but pre-defining a completed list would be much faster, assuming the List is not going to be edited by the App User.
I see your List is Static, 195 country flags and their related ISO country code? If you can send me a text file (.txt) of the codes and the flag images numbered to synch with the country code I have a desktop program that can convert them into an HTML table (two columns).
You can't upload a zip file of the flags, but you can change the ext to .aia - that should work
this any help?
Getting and displaying flags of the world is a fairly trivial affair and can be done with blocks without too much trouble. I thought that I would have a go at an extension that contains and supplies all the current world country flags in one package.
After several iterations, it seems the best solution, for on and offline use, was to convert all the flags to base64 (thanks
@vknow360 for the suggestion) and store them in the extension as text. It is possible to store all the images as assets ins…
you would probably need to use a dynamic components extension to create a listview
you are welcome to the source code, if you want to remix.
Thank You, no I don't have the txt file.
Thanks to all for the quick reply, this community is awesome.
Now i have the tools to solve my problem.
pls share with the community what is your solution. thanks
You could also use
@Kevinkun 's Tableviewer extension:
Not tested, but you should be able to set the img src to a datauri to use base64 strings from a text file, instead of images. (
with my sentence I just wanted to say that with the answers I got from the community I will surely find a way to solve my problem.