I have an EditText that I would like to only allow numbers and multiple periods (for entering an IP address).
Unless I am missing something, I can't seem to get what I want.
If I use INPUT_TYPE_TEXT then it shows the full (alpha) keyboard. If I use INPUT_TYPE_NUMBERS then it shows the numeric keyboard but will not allow the user to enter a period. If I use INPUT_TYPE_DECIMAL_NUMBERS then the user can enter numbers and a period, but it will not allow more than one period (decimal point).
I could probably do my own filtering for invalid characters, but how do I simply pop-up a numeric keyboard when the user clicks on an EditText, and how can I make it accept numbers and multiple periods?
Unless I am missing something, I can't seem to get what I want.
If I use INPUT_TYPE_TEXT then it shows the full (alpha) keyboard. If I use INPUT_TYPE_NUMBERS then it shows the numeric keyboard but will not allow the user to enter a period. If I use INPUT_TYPE_DECIMAL_NUMBERS then the user can enter numbers and a period, but it will not allow more than one period (decimal point).
I could probably do my own filtering for invalid characters, but how do I simply pop-up a numeric keyboard when the user clicks on an EditText, and how can I make it accept numbers and multiple periods?