I'm a bit new to android dev. I have a preference screen on my app with a bunch of EditTextPreference and checkbox pref. I'm interested in doing validation on the input to the edittextpreference. It seems there is no way to do this using android, so I have developed a class that extends the edittextpreference.
For example, I have a text preference that only has a valid range of 0 to 1. The text preference will take in any numbers, but I need to validate this before setting.
I'm overriding the setText method, and trying to do validation there before actually setting the value. SetText only passes in the text string, how do I know what I am trying to validate? How can I get that information? In other words, I'd like to reuse my class to validate all of my text preferences, and I'd like something in the preference itself to tell me what type it is, or what it's range is.