Last updated 2 years ago by Romain Guefveneujava
First thing first, how to format a currency? The position of the currency symbol doesn’t depend on the currency itself, but on the country of the locale.
Building our own currency input field is not very complicated. The main issue to solve is to know where to draw the currency symbol. Indeed, depending on the currency format, we have seen that the symbol can be either before the value or after the value. As we certainly don’t want to parse the format pattern, these four DecimalFormat methods will be useful: