chris wrote:
> Hi
> 
> I'm using a PreferenceActivity with a PreferenceScreen defined in a
> xml file.
> i want to make sure that the data set on a preference editor are valid
> (integer , integer in a range....)
> 
> So , i want to be able to intercept a click on a button of the
> EditTextPreference , check the validity of the data and if the data is
> incorect , display a message to the user and come back on the
> EditTextPreference.

Specifically in the case of EditTextPreference, you can use many of the
TextView XML attributes in the preference XML (e.g., android:digits to
force numbers-only input). Also, you can get the EditText of the
EditTextPreference in Java and configure it that way, with
setKeyListener() and setInputFilter() to help control input.

With luck, that will cover your needs.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to