The inputtype numberdecimal in edittext uses the dot '.' as decimal separator. in europe it's common to use a comma ',' instead. even though my locale is set as german the decimal separator is still the '.' is there a way to get the comma as decimal separator?. So just a pretty straight forward question. i have a textview that holds a number value (that is constantly being updated. so is there a method i can use to automatically add a comma if the number increases?. Format edittext number with comma this is how to format number with comma of an edittext when we enter the number. 1.activity_main.xml <linearlayout xmlns:android=&qu....
To be dynamic to your rule, simple add a text listener to the edit text and when the new character is breaking your rule, simply set it to substring(0, length -1) etc – s.w. aug 8 '16 at 15:44. Decimalformat is a concrete subclass of numberformat that formats decimal numbers. it has a variety of features designed to make it possible to parse and format numbers in any locale, including support for western, arabic, and indic digits.. When input a big value number to edittext, for example, a number which has a lot of followed 0 numbers, user may be confused or mistyped the number value. so, in some cases, you - as a developer - should provide a format for the number input type. most popular, you can insert the comma (,) or dot (.) as thousand separators for input data and it's will automatic adding when user typing..