S Sub7 Active Member Licensed User Longtime User May 8, 2014 #1 Hello, i fill a listview2 with content retrieved from my webserver, the server output a Json array and it look looks like this: Code: [{"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: Code: 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.
Hello, i fill a listview2 with content retrieved from my webserver, the server output a Json array and it look looks like this: Code: [{"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: Code: 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.
Erel B4X founder Staff member Licensed User Longtime User May 8, 2014 #2 See ImageDownloader: http://www.b4x.com/android/forum/th...-simple-way-to-download-images.30875/#content Upvote 0
See ImageDownloader: http://www.b4x.com/android/forum/th...-simple-way-to-download-images.30875/#content
S Sub7 Active Member Licensed User Longtime User May 8, 2014 #3 Erel said: See ImageDownloader: http://www.b4x.com/android/forum/th...-simple-way-to-download-images.30875/#content Click to expand... 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
Erel said: See ImageDownloader: http://www.b4x.com/android/forum/th...-simple-way-to-download-images.30875/#content Click to expand... 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
Erel B4X founder Staff member Licensed User Longtime User May 8, 2014 #4 You should use CustomListView instead of ListView (see the second example in the link above). Upvote 0
S Sub7 Active Member Licensed User Longtime User May 8, 2014 #5 Erel said: You should use CustomListView instead of ListView (see the second example in the link above). Click to expand... I am using SPlistview becaue it support richstrings needed on my app, any workaround? thx Upvote 0
Erel said: You should use CustomListView instead of ListView (see the second example in the link above). Click to expand... I am using SPlistview becaue it support richstrings needed on my app, any workaround? thx
Erel B4X founder Staff member Licensed User Longtime User May 8, 2014 #6 You can use RichString library with CustomListView. Upvote 0
S Sub7 Active Member Licensed User Longtime User May 8, 2014 #7 Erel said: You can use RichString library with CustomListView. Click to expand... Great, thank you Erel. Upvote 0
Erel said: You can use RichString library with CustomListView. Click to expand... Great, thank you Erel.