Re: [android-beginners] Restricting the input in an edit text
On Sat, Jul 10, 2010 at 9:54 PM, Emmen Farooq farooq.em...@gmail.comwrote: Restrict special characters from being entered into an edit text ? Look at the docs for EditText. There should be one or more listeners you can attach to determine when text is entered into the control. From there, just check for characters you don't want and remove them. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Restricting the input in an edit text
On Sat, Jul 10, 2010 at 10:54 PM, Emmen Farooq farooq.em...@gmail.com wrote: How do I a ) Restrict special characters from being entered into an edit text ? I have no idea what special characters are. Take a look at android:inputType and setKeyListener(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Restricting the input in an edit text
like !...@#$%^*() , I mean i dont want to allow these to be entered , thanks agian On Sun, Jul 11, 2010 at 5:23 PM, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 10, 2010 at 10:54 PM, Emmen Farooq farooq.em...@gmail.com wrote: How do I a ) Restrict special characters from being entered into an edit text ? I have no idea what special characters are. Take a look at android:inputType and setKeyListener(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Restricting the input in an edit text
On Jul 11, 2010, at 7:27 AM, Emmen Farooq wrote: like !...@#$%^*() , I mean i dont want to allow these to be entered , thanks agian You could use regex to identify the characters you don't wish to allow, and cause the UI to redirect the user to the field with the offending characters along with an error message. Mark -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en