2017-03-28 25 views
0

Spinner被選中時,是否可以訪問string-array項目的屬性? 我有以下字符串數組:如何訪問XAML中的字符串數組項目屬性xamarin

<string-array name="paypal_selling_rates"> 
     <item fee="0.026">Under $2,500</item> 
     <item fee="0.022">$2,500.01 - $5,000</item> 
     <item fee="0.020">$5,000.01 - $15,000</item> 
     <item fee="0.015">$15,000.01 - $150,000</item> 
     <item fee="0.011">Over $150,000</item> 
    </string-array> 

現在我可以選擇的項目是這樣的值:

paypalSellingRates.SelectedItem.ToString(); 

但我怎麼能訪問屬性費?

回答

1

這看起來像一個Android問題。在Android上,字符串數組資源不能具有項目的屬性。

所以答案是你不能。

official Android documentation中瞭解更多關於此的內容。

+0

這將是不幸的。 –

相關問題