code: private void initializeThemePreference() {
          Preference themePreference = findPreference(getString(R.string.theme_preference_key));
          themePreference.setOnPreferenceChangeListener(createThemeChangeListener());
      }
docs: Initializes the preference, which allows to change the app's theme.