I have a edit text. i want to enter the decimal values in it.
that is when i have enter a first number. it should be like this: .01
then i have enter a second number. it should be like this: .12
then for third one. it should be like this: 1.23
it will go like this…. how to implement this scenario. Any Idea?
You should add a TextWatcher to the EditText. This will notify you when the text changes.
When you know the text has changed, you can run it through a DecimalFormat: