I want to change user entered character in a EditText. in fact i want when user types in Edit text, If input character is "S", replaces it with "B" character. i want do this realtime.
I want to change user entered character in a EditText. in fact i want when user types in Edit text, If input character is "S", replaces it with "B" character. i want do this realtime.
Most likely you need to use TextWatcher that it pretty designated for your goal and allows you to manipulate with content of EditText in realtime.
Example:
edittext.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
public void afterTextChanged(Editable s) {
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With