2

I have an EditText-Object in my Android App where the user can input a "street number". Because street number may also consit of characters, character input should not be disabled at all, rather it numeric input should just be preselected and if the user wants he can also switch to character input. Until now I could not find any combination of Flags using

editText.setInputType(...);

Possible allowed entries in the EditText would be: 23a-26b

This always disallows some other input type, but what I want is just a preselected inputType.

Any ideas?

Peter Ittner
  • 551
  • 2
  • 13
  • you mean you just want to input nos and characters in the edit text – Goofy Nov 12 '12 at 12:53
  • 1
    yes, and i want that numeric input is the pre-selected method. – Peter Ittner Nov 12 '12 at 14:25
  • There are lots of answers to this on many related posts, but unfortunately *it is not currently possible* using `inputType` or `setRawInputType()` if you want your code to work on "most devices" – Richard Le Mesurier Nov 25 '15 at 05:50
  • Possible duplicate of [EditText with number keypad by default, but allowing alphabetic characters](http://stackoverflow.com/questions/3544214/edittext-with-number-keypad-by-default-but-allowing-alphabetic-characters) – Richard Le Mesurier Nov 25 '15 at 05:50

0 Answers0