I need to divide a amount on triads when I input its in EditText, how in calculator. Is there a property EditText or I need do this programmatically?
Example: I have: 1000000 I need: 1 000 000 Dividing should occur during the input amount.
I need to divide a amount on triads when I input its in EditText, how in calculator. Is there a property EditText or I need do this programmatically?
Example: I have: 1000000 I need: 1 000 000 Dividing should occur during the input amount.
This is Decimal formatting. As Described by Andreas_D in
How to set thousands separator in Java?
DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);
DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
symbols.setGroupingSeparator(' ');
formatter.setDecimalFormatSymbols(symbols);
System.out.println(formatter.format(bd.longValue()));