0

I have an EditText in which I have to take amount input. I want that whatever amount user types, it should appear with points i.e. when user types 15, it should appear as 15.00 and user himself can type 15.00 or 15.50. How to achieve that type of input?

Khawar Raza
  • 15,870
  • 24
  • 70
  • 127
  • http://stackoverflow.com/questions/5107901/better-way-to-format-currency-input-edittext might be your solution – zapl Mar 15 '12 at 10:20

2 Answers2

0

You can attach to the text changed event and reformat the text. See here: http://www.eridem.net/android-tip-006-on-text-change-in-edittext-view

Ollie C
  • 28,313
  • 34
  • 134
  • 217
0

Use TextChange Listener.. if he does't insert a decimal point.. You append it at the end ..

more here

ngesh
  • 13,398
  • 4
  • 44
  • 60