v2.0.2September 24, 2017
v2.0.1 ChangesJuly 14, 2017
🛠 Fix for Issue #24
v2.0.0 ChangesJuly 09, 2017
CurrencyEditText 2.0 is here!
🔨 2.0 contains some significant refactoring to the existing solution, including some breaking changes (hence the new major version). Some of the biggest changes include:
- setLocale will no longer override a caller-specified hint if one was provided
✂ get/setCurrency removed - Exposing currency was exposing too much implementation detail for not enough gain. The currency class is only used by the formatter to obtain the decimal digit location. Therefore, this information is now exposed directly through a new API.
🆕 new API
int getDecimalDigits()and setDecimalDigits(int digits)` - Allows the user to specify how many decimal digits should be shown, overriding the users locale formatting. This is primarily useful for showing only whole-number values (e.g. $100 instead of $100.00). This value can also be set via an XML layout attribute.
🆕 new API
configureViewForLocale(Locale locale)- This is the new primary mechanism for overriding the users device locale should you need to do so. While you can still manually set the locale via setLocale(), this method will also handle decimal digit calculations, hint updates, refresh the view, etc.
🆕 new API
setValue(long value)- takes a long and handles formatting and populating the view, rather than callers having to call formatCurrency() and setText() themselves.
⚡️ max length restriction lifted - The old limit of 15 characters is gone thanks to updates in how the formatter is set up.
👍 better test coverage - Additional tests to provide better code coverage, as well as new testing libraries to facilitate additional testing moving forward.
✅ test app greatly enhanced to showcase more features - Several new views have been added to the Test app to allow developers to get a better idea of how
CurrencyEditTextworks and what's going on 'under the hood'.
➕ Additionally, several open issues were closed out.
My apologies for allowing this library to sit idle for so long. I'm going to make a conscious effort to give this tool more attention moving forward. Thanks to everyone that uses it and provides feedback.
v1.4.4June 08, 2016
v1.4.3June 08, 2016
v1.4.2June 08, 2016
v1.4.1June 08, 2016
v1.4.0June 08, 2016
v1.3.1February 11, 2016
v1.3.0 ChangesFebruary 08, 2016
- Override device locale
- 👌 Support for negative numbers
- ✅ Test app and unit tests