My question is simple, yet I don't know the answer.
WHAT I WANT:
<string-array name="items_array">
<item id="id1">Item1</item>
</string-array>
THIS IS WHAT I CURRENTLY HAVE:
<string-array name="items_array">
<item>Item1</item>
</string-array>
What do I want to achieve with that is, that I want to offer in my Spinner
normal names (e.g. Martin). Yet in the ID
of that item, I want to have e.g. "martin93".
The ID
is usefull to append it to my URL, from which I want to fetch some data. But I want the user to choice a "normal" name, instead of weird (for example FaceBook) url name.
IMPORTANT: The facebook example is just given for explanation purposes, I am trying to achieve something else, but very similar (with ID I want to fetch the real URL's name, that is not nice to read, if I'd put it directly into Spinner).
Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…