02-07-2013 11:50 AM - edited 02-07-2013 11:50 AM
Is there a way to stop the keyboard from allowing the user to type symbols. I do not want them to be able to use characters such as:
/ + - = etc.
Solved! Go to Solution.
02-07-2013 12:06 PM - edited 02-07-2013 12:18 PM
Other than replacing them after they were typed I think that's not possible.
I prefer a post-validation approach until there's a better filtering API: i.e. let user type anything, but if the input is invalid display the hint below the TextField with suggested corrections.
Another approach is creating a custom keyboard (Container with ImageButtons), but this will require creating a custom input field too. This should work for apps like calculators. I think it's not possible to replace the system keyboard.
Btw, when analyzing diffs between 1673 and 2318 SDK headers I've noticed that textFilter property appeared in TextArea control. I haven't tried to use it yet.
There's only one filter right now: SingleLineTextFilter.
Theoretically it should be possible to inherit from AbstractTextFilter to create other custom filters. UPD: seems it's not possible yet.
02-07-2013 12:38 PM
Thanks for the detailed response.
I decided to just remove the chars from the text using: