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
  • 1,934
  • 2
  • 19
  • 54

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,052
  • 1
  • 25
  • 37