Android Question Maps (datatype)

aidymp

Well-Known Member
Licensed User
Longtime User
Hi just a quick question cos I see mixed answers in the forum!

adding things to a map! do they stay in the order you add them? Or they change order???

I am NOT SAVING the map! - just using it

I use php, to make a csv, read the csv into a map, I was hoping to use the .tag feature but a control i am using (coverflow by informatix) seems to not support that...

So was hoping the information was in the same order as it was added?

is it?

Thanks

Aidy
 

aidymp

Well-Known Member
Licensed User
Longtime User
The order can not be garanteed.
Dont rely on the order. Use the correct KEY instead.
Hmmm! just a point on the above the control (coverflow is not what im loading it into Im loading it into a list) How can I tie them together?

Currently am just doing.

B4X:
For Each k As String In ImageMap.Values
                BuildsListOfImages.Add(k)
            Next

before I was adding manually, and using Select case (position of list) case 0,1,2 etc! as you can imagine on 40+ images this was a nightmare!

So how can I tie them together? so the key is somehow matched to the value in the list?

Thanks

Aidy
 
Upvote 0

Similar Threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…