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 ) ; }
Initializes the spinner which allows to choose the preference header which should be removed .