BlacKCaT27 / CurrencyEditText

A module designed to encapsulate the use of an Android EditText field for gathering currency information from a user. Supports all ISO-3166 compliant locales/currencies.
Apache License 2.0
339 stars 79 forks source link

Is it possible to relies on currency code without Locale? #42

Closed b95505017 closed 6 years ago

b95505017 commented 6 years ago

As title. In our project, we init the Currency object by currency code instead of Locale.

BlacKCaT27 commented 6 years ago

No. Overriding the defaults based on currency was supported before, but was removed in 2.0 due to a lot of extra complexity it added for very little net gain.

If you're starting from a currency object instead of locale, you can use NumberFormat to do a "lookup" of sorts to find the matching locale object.

https://coderanch.com/t/609799/java/locale-instance-currency-symbol-java

On Tue, Nov 14, 2017 at 2:50 AM, Yu-Hsuan Lin notifications@github.com wrote:

As title. In our project, we init the Currency object by currency code instead of Locale.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BlacKCaT27/CurrencyEditText/issues/42, or mute the thread https://github.com/notifications/unsubscribe-auth/AE_54dcKvtV6zR2IjMBMdk6YGI_AcowCks5s2UZdgaJpZM4Qc7fX .