0

I'm not sure this is solvable really, but it's worth the check.
I was writing my own InputFilter that helps the user in inputing the right chars for ipv4 adress in an EditText. First stop of course is just filter whatever is not digit or '.' second step is disallow more than 3 '.' third one is to prevent more than 3 digits per group and last is to actually check the number can be (no more than 255)
In any case, I was trying to set rawInputType to InputType.TYPE_CLASS_NUMBER so the keyboard will fit. Only then I put my input filter and only mine so the system's one will not prevent '.' chars.
This works fine, however I'm using a Nexus 4 and the native keyboard in landscape has it's own TextView to display the typings and it vanishes the '.' marks!
Probably because of the input type.

Anyway around this ?

reVerse
  • 35,075
  • 22
  • 89
  • 84
codeScriber
  • 4,582
  • 7
  • 38
  • 62
  • Are you referring to the auto correct bar, where it shows what it thinks the input should be? – Adam W Feb 07 '15 at 20:04
  • nop. when u rotate the device the keyboard is turned off, when u ask for the keyboard in landscape mode it takes over the whole screen, thus the text u see while typing is NOT displayed in your my EditText but in the keyboard's... – codeScriber Feb 07 '15 at 20:15
  • Possible duplicate of [http://stackoverflow.com/questions/4336762/disabling-the-fullscreen-editing-view-for-soft-keyboard-input-in-landscape][1] [1]: http://stackoverflow.com/questions/4336762/disabling-the-fullscreen-editing-view-for-soft-keyboard-input-in-landscape – Adam W Feb 07 '15 at 20:18
  • disabling full screen ? that's the solution for writing InputFilter ? really ? – codeScriber Feb 07 '15 at 20:21
  • Not a duplicate, although that's one possible work around. Is it not adding new . characters, or is it deleting old ones? The second would be really weird behavior to me. – Gabe Sechan Feb 07 '15 at 20:28
  • it's both, it doesn't show disallowed chars like '.' but in the EditText if you close the keyboard they do show up so for example a test like '192.16' will show in the keyboard view as '19216' if u add 8. u'll see just the 8 but when you close the keyboard u are left with '192.168.' the EditText works fine, that's the issue, i don't understand why the soft keyboard especially when taking over the screen doesn't take into account the Inputfilters of the user. – codeScriber Feb 08 '15 at 05:47

0 Answers0