1

I have string array like this:

<resources xmlns:android="http://schemas.android.com/apk/res/android">
<string-array name="my_videos">
    <item>bunny.mp4</item>
    <item>bunny.m4a</item>
    <item>bunny.3gp</item>
</string-array>

And in my app I have this:

String product = ((TextView) view).getText().toString();

Now I want to put some normal text like this:

<resources xmlns:android="http://schemas.android.com/apk/res/android">
<string-array name="my_videos">
    <item name="bunny.mp4">Movie description 1</item>
    <item name="bunny.m4a">Movie description 2</item>
    <item name="bunny.3gp">Movie description 3</item>
</string-array>

Now I want to acces name attribute and not get text. I am new to Android and do not know if this is possible.

Please help.

pregmatch
  • 2,629
  • 6
  • 31
  • 68
  • I guess my question is how can I know what is clicked? And then open that in another activity windows. This android sucks PHP and Javascript are great! – pregmatch Oct 10 '12 at 17:04
  • 1
    Duplicate : http://stackoverflow.com/questions/7224926/how-to-get-name-attribute-of-item-of-string-array – Zakaria Oct 10 '12 at 17:20
  • And by the way, if your are more comfortable with web technologies, there are good frameworks like PhoneGap that could suit your skills. – Zakaria Oct 10 '12 at 17:20

0 Answers0