我的 xml 中有这个数组
<string-array name = "locations">
<item value = "KDLH">Duluth International Airport</item>
<item value = "KBJI">Bemidji</item>
<item value = "KAUM">Austin Municipal</item>
<item value = "KBDE">Baudette International Airport</item>
<item value = "KBBB">Benson Municipal</item>
<item value = "KCBG">Cambridge Municipal</item>
<item value = "KCQM">Cook Municipal Airport </item>
<item value = "KCOQ">Cloquet</item>
<item value = "KTOB">Dodge Center Airport </item>
<item value = "KEVM">Eveleth</item>
<item value = "KLXL">Little Falls</item>
<item value = "KMML">Marshall</item>
<item value = "KANE">Minneapolis / Blaine </item>
<item value = "KLVN">Minneapolis, Airlake Airport</item>
<item value = "KMSP">Minneapolis-St. Paul</item>
</string-array>
我试图在选择项目而不是文本时检索值。我该怎么做呢?目前我只能通过这样做来检索文本。我目前只能检索选定的文本,而不是 value 属性。