Android Question HttpJob inside another HttpJob and listview2?

Sub7

Active Member
Licensed User
Longtime User
Hello, i fill a listview2 with content retrieved from my webserver, the server output a Json array and it look looks like this:

B4X:
[{"user":"user182","gender":"18","age":"33","comment":"hello this is my message","profile_picture":"http://www.somehost.com/image.jpg","sent_date":"2014-05-08 11:11:20"}]

The problem is that since now i need to use AddTwoLinesAndBitmap2 "i need to make two jobs?" because in the array i have the url of the image, so in the first job i am parsing the json array and saving values then from:

Dim profile_picurl As String
profile_picurl = m.get("profile_picture")

Then i need to download the image and put it on:

B4X:
ListView1.AddTwoLinesAndBitmap2(stuff_fromarray1,stuff_fromarray2,profile_picturebmp.Bitmap,tapvalue)

Everything works, i can fill the listview with data retrieved from server but i cannot load the single images.

I am using SPlistview becaue it support richstrings needed on my app.

Thank you so much.
 

Sub7

Active Member
Licensed User
Longtime User
Hi, thanks yes i was using that and i have the problem that for all the entries of the listview is shown the same image, no matter if i change the url.
By logging the job i see that the urls are all differents so i am correctly passing differnt urls for each row of the listview.
I tried commenting the cache part of code adn still i see always the first images downloaded for all listview rows.
I tried to invalidate the imageview but no success.

ty
 
Upvote 0
Top