code: private Chip.CloseListener createChipCloseListener() {
          return new Chip.CloseListener() {
  
              @Override
              public void onChipClosed(@NonNull final Chip chip) {
                  chip.setVisibility(View.GONE);
                  Toast.makeText(MainActivity.this, R.string.chip_closed_toast, Toast.LENGTH_SHORT)
                          .show();
              }
  
          };
      }
docs: Creates and returns a listener, which allows to show a toast, when a chip has been closed.
  
  @return The listener, which has been created, as an instance of the type {@link
  Chip.CloseListener}