java - Android bug with preferences? -


so have app uses various currency symbols , can select whichever via standard preference view , noticed if currency uses same symbol e.g. usd, aud, sgd ($) default last item in list. instance, list below if choose usd or aud default sgd when click again if choose zar, myr, eur, or gbp stick 1 value doesn't repeat. doing wrong here or known issue?

    <string-array name="currency">     <item name="eur">eur</item>     <item name="gbp">gbp</item>     <item name="jpy">jpy</item>      <item name="usd">usd</item>     <item name="zar">zar</item>      <item name="myr">myr</item>          <item name="cny">cny</item>      <item name="aud">aud</item>      <item name="sgd">sgd</item>                                                                                                                                                                          </string-array>  <string-array name="currencyvalues">     <item name="eur">€</item>     <item name="gbp">£</item>     <item name="jpy">¥</item>     <item name="usd">$</item>     <item name="zar">r</item>        <item name="myr">mr</item>       <item name="cny">¥</item>        <item name="aud">$</item>        <item name="sgd">$</item>                                                                                                                                                                                                                                                                                                                                            </string-array> 

i wouldn't call bug because it's not said should happen duplicate values. reason i'm saying behind curtain there's no way of knowing of entries chosen actual value ($ in special case) saved.

one way around have currency name (or integer each currency) in values , have secondary function parse currency symbol. quicker hack save both currency name , symbol, aud$ , show last character when want use it.

however, suggestion use currency name avoid confusion between different currencies. wikipedia instance says usd, sgd , aud abbreviated us$, s$ , a$, respectively.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -