Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
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: