PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → WinDev Mobile 18 Looper on Android
WinDev Mobile 18 Looper on Android
Débuté par rob, 02 sep. 2014 21:27 - 2 réponses
Membre enregistré
105 messages
Posté le 02 septembre 2014 - 21:27
Heya again everyone.
I'm writing a simple app for Android that retrieves information from a web service and I need to display those records on the screen.

I figure the easiest way to do this would be with a looper control.

Here's the issue I'm running into.

So far I've figured I can get the info into the looper in one of two ways. Either link the looper control to the array that contains the information, or use the AddLooperLine() function to add each record.

My array consists of a structure with 3 elements. A record number, a text string, and a 2nd text string that will control the color of the text for that record.

If I try to link the looper to the array directly, it doesn't work. the looper control remains blank on the screen even though the array has all the information in it.

If I use LooperAddLine() to add each record to the looper manually, it works perfectly, but is very slow. So I'd like to avoid using this method.

Any pointers on what I should look at to get the looper control linked to the array correctly?
Posté le 01 octobre 2014 - 14:59
If you bind the Looper to an Array then I don't think you will be able to color code the looper elements.

The best way would be to manually populate the Looper.

I think there should be some way to prevent the Looper from updating itself when one is adding contents to it.

The experts will know better then me in this regards.

Regards,

Indic
Membre enregistré
105 messages
Posté le 01 octobre 2014 - 16:06
Thanks. I was hoping to avoid manually populating it with LooperAddLine() since that seems to be a very slow processes, and in some cases I could be adding a couple thousand records.

Alternatively I was looking at having that update process run as a background task. Haven't had much luck with that yet. Though I haven't had much time to work on it either as this is a little side project.