An apology for my bad English, I\'m using google translate.
I\'m creating an activity in which users must create a new profile. I put a limit to edit text of 15 char
use the the following line in edittext in xml file so that it only enters the alphabets and numbers;
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
If you need dynamic response use textwatcher for your edittext;
yourEditText.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s) {
// Here you need to check special character, if found then show error message
if (s.toString().contains("%"))
{
// Display error message
}
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
public void onTextChanged(CharSequence s, int start, int before, int count) {}
});