androidworld786
Lurker
I need to partially change the edit text line color as the user types the input only for that length of text the line below should change the color.
I tried using text watcher and
email.getBackground().setColorFilter(getResources().getColor(R.color.black), PorterDuff.Mode.SRC_IN);
but that changes the color of complete line. Could someone please help me here ?
I have been stuck on this for quite sometime.
textWatcher = new TextWatcher() {
@override
public void onTextChanged(CharSequence s, int start, int before, int count) {
email.getBackground().setColorFilter(getResources().getColor(R.color.black), PorterDuff.Mode.SRC_IN);
}
@override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
@override
public void afterTextChanged(Editable s) {}
I tried using text watcher and
email.getBackground().setColorFilter(getResources().getColor(R.color.black), PorterDuff.Mode.SRC_IN);
but that changes the color of complete line. Could someone please help me here ?
I have been stuck on this for quite sometime.
textWatcher = new TextWatcher() {
@override
public void onTextChanged(CharSequence s, int start, int before, int count) {
email.getBackground().setColorFilter(getResources().getColor(R.color.black), PorterDuff.Mode.SRC_IN);
}
@override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
@override
public void afterTextChanged(Editable s) {}