-1

I am making a calculator in android, and I have make a button of dot operator, whenever I am pressing that button, it is not showing dot on screen like it should show 2.4 but it's showing 24 , what can I do???.I have used edit text field for showing result.

1 Answers1

1

I think this is what you're looking for...Try the below code

Edt.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);

See this link too and refer this question

Hope this helps you..

Community
  • 1
  • 1
Vinoth Vino
  • 9,166
  • 3
  • 66
  • 70