I have an EditText that allows the user to enter a filename, and I am restricting certain characters being used, such as / \ ?, etc.
Currently, I allow the user to enter anything they want, then before committing the filename, run it through a regexp checking for invalid characters. If any are found, the EditText remains active, and the user is shown a Toast with a message about using only valid characters, and a list of invalid characters. Since I know ahead of time which characters I will accept, a better solution would be to simply remove or disable them on the virtual keyboard (an continue to do a final regexp in case the characters were generated from an external keyboard). I've searched, but can't find anything specific to removing/disabling specific virtual keyboard characters. Is this possible? I found this post on StackOverflow that metions using one of a TextWatcher or InputFilter, but those seem to largely operate AFTER input, rather than preventing it in the first place, which is really what I am after. Thanks for any pointers, or a quick 'not possible' if that is the case. Paul -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

