2008-11-01 17:32:06 -04:00
|
|
|
|
2008-12-16 18:34:01 -05:00
|
|
|
package com.android.email;
|
2008-11-01 17:32:06 -04:00
|
|
|
|
2008-12-16 18:34:01 -05:00
|
|
|
import com.android.email.mail.Address;
|
2008-11-01 17:32:06 -04:00
|
|
|
|
|
|
|
import android.util.Config;
|
|
|
|
import android.util.Log;
|
|
|
|
import android.widget.AutoCompleteTextView.Validator;
|
|
|
|
|
|
|
|
public class EmailAddressValidator implements Validator {
|
|
|
|
public CharSequence fixText(CharSequence invalidText) {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isValid(CharSequence text) {
|
2009-05-31 21:55:39 -04:00
|
|
|
return Address.parseUnencoded(text.toString()).length > 0;
|
2008-11-01 17:32:06 -04:00
|
|
|
}
|
|
|
|
}
|