how to make edittext should get unique letters as input.
if already letter is there in the edittext we should filter it
Thanks in advance.
how to make edittext should get unique letters as input.
if already letter is there in the edittext we should filter it
Thanks in advance.
My idea is you register a TextWatcher to your EditText
and override afterTextChanged
.
And store it using Shared Preferences.
try using TextWatcher to filter chars input by user
TextWatcher mTextWatcher = new TextWatcher() {
private CharSequence temp;
@Override
public void beforeTextChanged(CharSequence s, int arg1, int arg2,
int arg3) {
temp = s;
}
@Override
public void onTextChanged(CharSequence s, int arg1, int arg2,
int arg3) {
}
@Override
public void afterTextChanged(Editable s) {
//CHECK HERE FOR UNIQUE LETTERS as INPUT BY USER and REMOVE IT
}
}
};