Thanks for the reply. I would probably use the setOnFocusChangeListener method and show notification in case of error. However, I didn't succeed to return focus to EditText control (Setting hasFocus value as TRUE in the method does not seem to influence anything...) How can I leave the focus in the control?
On May 24, 5:38 pm, Mark Murphy <[EMAIL PROTECTED]> wrote: > Shaimailitwrote: > > Hi, > > Thanks for your answer and sorry about the late reply. > > I have set the xml attribute > > "android:inputMethod="android.text.method.DateInputMethod"". > > It seems that it prevents input of any other characters except numeric > > and some > > special chars, but it does not check that the entire input is valid > > (as date). > > How can such validity check be done? > > When the user indicates "please do something with what I've entered" > (via a button, menu choice, or whatever), read the value of the field > and try to parse it using DateFormat. > > Or, use setOnFocusChangeListener() to register the validation logic to > be done when the field loses focus. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > Android Training on the Ranch in September!http://www.bignerdranch.com --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

