i am a newbie here. My question is as below:
This is my value/strings.xml file:
<string name="bm">Mengawal</string>
<string name="bi">Managing</string>
<string name="penan">Penan</string>
<string-array name="menu">
<item>@string/bm</item>
<item>@string/bi</item>
<item>@string/penan</item>
</string-array>
I have my dynamically assign button in my java file. Now, i want to set the button id programmatically from the xml above. For example,
the button text is ="Mengawal" I wana set the button id to become ="bm"
I saw an example over here, but i cant understand what it actually means. Or is it possible for me to make it like this? Is it possible to access a string-array item in Android?
Thanks for the help.