code: private void initializeSpinner(final View parentView,
                                     final Collection<NavigationPreference> navigationPreferences) {
          spinner = parentView.findViewById(R.id.remove_preference_header_spinner);
          List<CharSequence> items = getNavigationPreferenceTitles(navigationPreferences);
          ArrayAdapter<CharSequence> adapter =
                  new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, items);
          adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
          spinner.setAdapter(adapter);
      }
docs: Initializes the spinner, which allows to choose the preference header, which should be
  removed.
  
  @param parentView
  The parent view of the spinner as an instance of the class {@link View}
  @param navigationPreferences
  A collection, which contains the preference headers, the spinner should allow to
  choose from, as an instance of the type {@link Collection}