I'd suggest you use TextWatcher. Here are simple steps to follow:
STEP 1 - Bring the EditText (or View) that you want to track into Java code
STEP 2 - Implement TextWatcher in your Activity or create a separate class at handles he responsibility of managing text changes (Implementation is similar to other listeners s.a. OnClickListener)
STEP 3 - Implement all the methods inside the TextWatcher (@Override interface methods)
STEP 4 - Use the addTextChangedListener method on the View (EditText) to link it to the TextWatcher (register the view)
STEP 5 - Use one of the available methods to perform the validation
Upon implementation, there will be 3 methods we must override from the interface:
void beforeTextChanged(CharSequence c, int i, int i2, int i3) {}
void onTextChanged(CharSequence c, int i, int i2, int i3) {}
void afterTextChanged(Editable e) {}
All these three methods are called consequently upon any change (like typing or deleting a letter). It's enough to use just one of them, and it's preferable to use the afterTextChanged method. EDITABLE parameter is just a text which we have inside our EditText at the time instant.