code: private void handleDone() {
          // Attempt to complete the current token token
          performCompletion();
  
          // Hide the keyboard
          InputMethodManager imm = (InputMethodManager) getContext().getSystemService(
                  Context.INPUT_METHOD_SERVICE);
          if (imm != null) {
              imm.hideSoftInputFromWindow(getWindowToken(), 0);
          }
      }
docs: Create a token and hide the keyboard when the user sends the DONE IME action
  Use IME_NEXT if you want to create a token and go to the next field