My code is:
I've another field in json where an image url is kept for each item. Can be possible to get using m.Get("item_image")
I can download the image using httputil2. So I need your instruction to use the image in ListView1.AddTwoLinesAndBitmap().
Thanks.
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim j As JSONParser
Dim ListView1 As ListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Web")
j.Initialize(File.ReadString(File.DirAssets, "a.json"))
Dim m1 As Map = j.NextObject
Dim L1 As List = m1.Get("items")
For Each m As Map In L1
ListView1.AddTwoLines(m.Get("item_name"), "Price: "&m.Get("item_price"))
Next
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
I've another field in json where an image url is kept for each item. Can be possible to get using m.Get("item_image")
I can download the image using httputil2. So I need your instruction to use the image in ListView1.AddTwoLinesAndBitmap().
Thanks.