Creating hashmap/map from XML resources
Posted
by KimAMartinsen
on Stack Overflow
See other posts from Stack Overflow
or by KimAMartinsen
Published on 2010-06-10T10:47:48Z
Indexed on
2010/06/10
10:53 UTC
Read the original article
Hit count: 207
Hi!
I'm making an application where a web service fetches (amongst other) a bunch of codes from a webservice (I.e BEL, FRA, SWE). During runtime I want to translate these codes to their apporiate names to display to users (I.e Belgium, France, Sweden). There can be a lot of these codes, so i'm wondering if there is any approriate way to store the (code, name) entry as a some sort of map in the XML resources in Android, so I can quickly fetch the name by the given code?
It's all about speed here, since the map can have a few hundred entries.
© Stack Overflow or respective owner