code: @Override
      protected void onSelectionChanged(final int selStart, final int selEnd) {
          // Handle case where there is only one cursor (i.e. not selecting a range, just moving cursor)
          if (selStart == selEnd) {
              if (!onCursorChanged(selStart)) {
                  super.onSelectionChanged(selStart, selEnd);
              }
              return;
          } else {
              updateSelectionIfRequired(selStart, selEnd);
          }
          super.onSelectionChanged(selStart, selEnd);
      }
docs: Called whenever the selection within the {@link EditText} has changed.
  
  @param selStart starting position of the selection
  @param selEnd   ending position of the selection