Releases: BlacKCaT27/CurrencyEditText
2.0.2 - Bug Fix to resolve crash when entering non-digits into empty field
Merge pull request #38 from BlacKCaT27/next Next
Bugfix #24 - setText("") not resetting view
Fix for Issue #24
CurrencyEditText 2.0
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 CurrencyEditText
works 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.
Enjoy!
fix npe
v1.4.4 update readme version
fix for default hint
1.4.3 minor version rev
v1.4.2
adding gradle wrapper
v1.4.1
adding gradle wrapper for jitpack
1.4.0 - default locale support
v1.4.0 resolving version name issue
Default Hint bug fix
v1.3.1 Update README.md
v1.3.0
- Override device locale
- Support for negative numbers
- Test app and unit tests