Im creating a convertor application. I want to set the EditText so that when the user is inputting the number to be converted, a thousand separator (,) should be added automatically in realtime to the number once it increments by 3 figures: thousand, million, billion etc.
And when erased to below 4 figures the number goes back to normal.
Any help?
Im creating a convertor application. I want to set the EditText so that when
Share
You can use
String.format()in aTextWatcher. The comma in the format specifier does the trick.This does not work for floating point input. And be careful not to set an infinite loop with the TextWatcher.