private TextWatcher createTextChangeListener ( ) { return new TextWatcher ( ) { @ Override public final void beforeTextChanged ( final CharSequence s , final int start , final int count , final int after ) { } @ Override public final void onTextChanged ( final CharSequence s , final int start , final int before , final int count ) { } @ Override public final void afterTextChanged ( final Editable s ) { if ( isValidatedOnValueChange ( ) ) { validate ( ) ; } adaptMaxNumberOfCharactersMessage ( ) ; } } ; }
Creates and returns a listener which allows to validate the value of the view when its text has been changed .