Add maxLength
Add CustomPreferenceSampleActivity.
Define minLength attribute.
Just change method name.
Disable OK button if the edit text length was lesser than minLength.