@Override public void onTextChanged(CharSequence charSequence,int i,int i1,int i2){
  if (isEditingMessage()) {
    if (message == null) {
      return;
    }
    boolean enableControls=!TextUtils.equals(newCursorEditText.getText(),message.getBody());
    hintView.setVisibility(View.GONE);
    editMessageCursorToolbar.enableEditControls(enableControls);
    return;
  }
  String text=charSequence.toString();
  if (cursorCallback != null) {
    cursorCallback.onEditTextHasChanged(newCursorEditText.getSelectionStart(),text);
  }
  if (TextUtils.isEmpty(charSequence.toString())) {
    hintView.setVisibility(View.VISIBLE);
  }
 else {
    hintView.setVisibility(View.GONE);
  }
  showTopbar(newCursorEditText.getLineCount() > maxLines);
}

@ Override public void onTextChanged ( CharSequence charSequence , int i , int i1 , int i2 ) { if ( isEditingMessage ( ) ) { if ( message == null ) { return ; } boolean enableControls = ! TextUtils . equals ( newCursorEditText . getText ( ) , message . getBody ( ) ) ; hintView . setVisibility ( View . GONE ) ; editMessageCursorToolbar . enableEditControls ( enableControls ) ; return ; } String text = charSequence . toString ( ) ; if ( cursorCallback != null ) { cursorCallback . onEditTextHasChanged ( newCursorEditText . getSelectionStart ( ) , text ) ; } if ( TextUtils . isEmpty ( charSequence . toString ( ) ) ) { hintView . setVisibility ( View . VISIBLE ) ; } else { hintView . setVisibility ( View . GONE ) ; } showTopbar ( newCursorEditText . getLineCount ( ) > maxLines ) ; }
notifies container that edit text has changed . and if text is not empty it triggers also the typing indicator .
