refer to: https://www.b4x.com/android/forum/threads/map-collection-the-most-useful-collection.60304/#content
Now I have the old code
I would like to use Map collection,but there is my mistake which I don't understand it.
Now I have the old code
B4X:
CLV1.Add(CreateItem(CLV1.AsView.Width,"Low Price",1000),"")
CLV1.Add(CreateItem(CLV1.AsView.Width,"Medium Price",10000),"")
CLV1.Add(CreateItem(CLV1.AsView.Width,"High Price",10000000),"")
I would like to use Map collection,but there is my mistake which I don't understand it.
B4X:
Dim Products As Map =CreateMap("Low Price":1000,"Medium Price":10000,"High Price":10000000)
For Each Products As String In Products.Keys
Dim Price As Float=Products.Get(Products)
CLV1.Add(CreateItem(CLV1.AsView.Width,${Products},{Price}),"") '<==This line is my problem
Next
Last edited: