Creating java.util.Map in Android -


I want to make java.util.map in Android with one resource. I want to do this because I have Java. There are several entries to populate in ITP.map and I want to store the values ​​in the project's reserve folder in XML format.

How to do this in Android? My map will be around 2500 entries, so I want to make it as effective as possible and I do not want to rigid them ...

thanks, yard

I think the XML format key-value pair is "too much" to simply store. A text file where a line is a key-value pair, it is more appropriate (such as with a comma separator), parsing will also be easy.

  foo1, bar1 foo2, bar2 ...   
  • Change your text file to the res / raw directory
  • Open it with context.getResources.openRawResource (R.raw)
  • Place them in your map
< Li> Split line to loop on each row and get key and value.

This is all


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -