> I have an XML file called user_preferences that contains my
> preferences for my application.
>
> How do I get hold of the different preference Views so that I can
> validate them?
>
> Currently I have the code below which is not working because
> getSharedPreferences does not return a View.

You can try calling getPreferenceScreen(), though a better approach is to
add more validation-style configuration to the preferences themselves. For
example, EditTextPreference supports all of the XML attributes that
EditText does for determining input type and such.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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