0

I am trying to customise the inpout format in EditText.

Following are the format that user can enter.

If Weight -> ###.## (Eg 105.50 kg)

If Water -> ##.## (Eg 41.50 Ltrs)

Can't guess how to do this.

karthik kolanji
  • 2,044
  • 5
  • 20
  • 56

1 Answers1

0

Did you try adding the attribute inputType="numberDecimal" for EditText in your layout.xml file?

Check this for how to restrict soft keypad for certain type in EditText.

Amit
  • 3,422
  • 3
  • 28
  • 39