I would like the user to be able to enter positive or negative numbers in an EditText.
When I set the Input Type to 'Numbers' it will not accept the negative (-) sign before a number.
When I set the Input Type to 'DecimalNumbers' it will accept the negative, but I don't want the user to be able to enter decimals, only whole numbers.
When I set the Input Type to 'Text' it will accept the negative, but then the text keyboard pops up, and the user could enter text which would need to be checked with IsNumber - therefore not ideal.
I know I could use the Number Dialog, but it seems so clumsy to enter a simple negative number like -5.
Can someone help, cause I'm sure I am overlooking something basic?
When I set the Input Type to 'Numbers' it will not accept the negative (-) sign before a number.
When I set the Input Type to 'DecimalNumbers' it will accept the negative, but I don't want the user to be able to enter decimals, only whole numbers.
When I set the Input Type to 'Text' it will accept the negative, but then the text keyboard pops up, and the user could enter text which would need to be checked with IsNumber - therefore not ideal.
I know I could use the Number Dialog, but it seems so clumsy to enter a simple negative number like -5.
Can someone help, cause I'm sure I am overlooking something basic?