So, I'm trying to figure out the best way to combine many data types together. Internal to my code, I'm creating a class. Externally, I want to have a single place to go to manage to following types of data, or at least pointers to said data. Note that there is a lot of sets of these data, and I anticipate adding more as time continues.
EDIT: I'm massively simplifying what was once here.
Imaging that at compile time, I have a list of objects. Each object has some characteristic, which all objects will have in common. These include:
- An imageImage
- Some strings
- An array of Integers
- An array of strings
I am wanting to find a way to store all of these together outside of any code. Ideally, I would like to use XML, with something that vaguely looks like this:
<storage_type>
<image resid="@id/image1" />
<name>Item_Name1</name>
</storage_type>
<storage_type>
<image resid="@id/image2" />
<name>Item_Name2</name>
</storage_type>
The images are currently stored as resource variables. I'm just not sure how I could put a reference to an image into the XML file.
I am not married to the idea of XML files, if a better solution can be found. All I want is a single database of some kind a way to access this information.
This data should not be changed, unless I submit a new update. These do not need to be updated at runtime, but I definitely would like to update them between builds, from time to time.. I've heard of Preferences, which might work, but I'm unsure if they might be user updatable somehow.