Initializes the elevation of the button bar.

@param sharedPreferences
The shared preferences, which should be used, as an instance of the type {@link
SharedPreferences}
432649
private void initializeButtonBarElevation(final SharedPreferences sharedPreferences) {
        String key = getString(R.string.preference_fragment_button_bar_elevation_preference_key);
        String defaultValue = getString(
                R.string.preference_fragment_button_bar_elevation_preference_default_value);
        int elevation = Integer.valueOf(sharedPreferences.getString(key, defaultValue));
        setButtonBarElevation(elevation);
    }
518150
private void initializePreferenceButton() {
        Button preferenceButton = findViewById(R.id.preference_button);
        preferenceButton.setOnClickListener(createPreferenceButtonListener());
    }
655089
private void initializeHideNavigation(final SharedPreferences sharedPreferences) {
        String key = getString(R.string.hide_navigation_preference_key);
        boolean defaultValue =
                Boolean.valueOf(getString(R.string.hide_navigation_preference_default_value));
        boolean hideNavigation = sharedPreferences.getBoolean(key, defaultValue);
        hideNavigation(hideNavigation);
    }
302080
private void adaptButtonBarVisibility() {
        if (buttonBar != null && buttonBarShadowView != null) {
            buttonBar.setVisibility(isButtonBarShown() ? View.VISIBLE : View.GONE);
            buttonBarShadowView.setVisibility(isButtonBarShown() ? View.VISIBLE : View.GONE);

            if (isButtonBarShown() && !isSplitScreen()) {
                adaptNavigationVisibility();
            }

            adaptNavigationEnabledState();
            adaptWizardButtonVisibilities();
        }
    }
916712
public void init(String configuration) {

        // initialize the members
        m_additionalButtons = new ArrayList<String>(OPTIONAL_BUTTONS_LIST.size());
        m_configuration = configuration;
        m_editorHeight = EDITOR_DEFAULTHEIGHT;
        m_hiddenButtons = new ArrayList<String>();
        // initialize the widget options
        parseOptions(configuration);
    }
1253379
private void initializeDrawer() {
    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_drawer,
        R.string.show, R.string.hide);
    mDrawerLayout.setDrawerListener(mDrawerToggle);
    getActionBar().setDisplayHomeAsUpEnabled(true);
    mDrawerToggle.syncState();
  }
1016154
private void setupSimplePreferencesScreen() {
        if (!isSimplePreferences(this)) {
            return;
        }

        // In the simplified UI, fragments are not used at all and we instead
        // use the older PreferenceActivity APIs.

        // Add 'general' preferences.
        addPreferencesFromResource(R.xml.pref_general);

        // Add 'notifications' preferences, and a corresponding header.
        PreferenceCategory fakeHeader = new PreferenceCategory(this);
        fakeHeader.setTitle(R.string.pref_header_notifications);
        getPreferenceScreen().addPreference(fakeHeader);
        addPreferencesFromResource(R.xml.pref_notification);

        // Add 'data and sync' preferences, and a corresponding header.
        fakeHeader = new PreferenceCategory(this);
        fakeHeader.setTitle(R.string.pref_header_data_sync);
        getPreferenceScreen().addPreference(fakeHeader);
        addPreferencesFromResource(R.xml.pref_data_sync);

        // Bind the summaries of EditText/List/Dialog/Ringtone preferences to
        // their values. When their values change, their summaries are updated
        // to reflect the new value, per the Android Design guidelines.
        bindPreferenceSummaryToValue(findPreference("example_text"));
        bindPreferenceSummaryToValue(findPreference("example_list"));
        bindPreferenceSummaryToValue(findPreference("notifications_new_message_ringtone"));
        bindPreferenceSummaryToValue(findPreference("sync_frequency"));
    }
1369437
@Initiate(priority = AutumnActionPriority.HIGH_PRIORITY)
    public void initiatePreferences() {
        for (final Entry<String, String> preference : preferencesToInitiate) {
            final String name = preference.key;
            final Preferences preferences = getPreferences(preference.value);
            namesToFiles.put(name, preferences);
            final Preference<?> preferenceWrapper = this.preferences.get(name);
            initiatePreference(name, preferenceWrapper, preferences);
            addLmlActions(name, preferenceWrapper);
        }
        preferencesToInitiate.clear();
    }
259540
function preferencesInitialize() {
          return this.initializedPromise = defaultPreferences.then(function (defaults) {
            Object.defineProperty(this, 'defaults', {
              value: Object.freeze(defaults),
              writable: false,
              enumerable: true,
              configurable: false
            });
            this.prefs = cloneObj(defaults);
            return this._readFromStorage(defaults);
          }.bind(this)).then(function (prefObj) {
            this.isInitializedPromiseResolved = true;
            if (prefObj) {
              this.prefs = prefObj;
            }
          }.bind(this));
        }
593892
private void addNavigationPreference() {
        NavigationPreference navigationPreference = new NavigationPreference(this);
        navigationPreference.setTitle(getPreferenceHeaderTitle());
        navigationPreference.setFragment(NewPreferenceHeaderFragment.class.getName());
        getNavigationFragment().getPreferenceScreen().addPreference(navigationPreference);
        invalidateOptionsMenu();
    }
543292
public final void restoreDefaults() {
        SharedPreferences sharedPreferences = getPreferenceManager().getSharedPreferences();

        if (getPreferenceScreen() != null) {
            restoreDefaults(getPreferenceScreen(), sharedPreferences);
        }
    }
580221
@Override
    public void addPreference(final U u, final I i, final Double d) {
        // update direct map
        Map<I, Double> userPreferences = userItemPreferences.get(u);
        if (userPreferences == null) {
            userPreferences = new HashMap<>();
            userItemPreferences.put(u, userPreferences);
        }
        Double preference = userPreferences.get(i);
        if (preference == null) {
            preference = 0.0;
        } else if (ignoreDuplicatePreferences) {
            // if duplicate preferences should be ignored, then we do not take into account the new value
            preference = null;
        }
        if (preference != null) {
            preference += d;
            userPreferences.put(i, preference);
        }
        // update items
        items.add(i);
    }
22246
private void initializeShowIntentBottmSheetPreference() {
        Preference showIntentBottomSheetPreference =
                findPreference(getString(R.string.show_intent_bottom_sheet_preference_key));
        showIntentBottomSheetPreference
                .setOnPreferenceClickListener(new OnPreferenceClickListener() {

                    @Override
                    public boolean onPreferenceClick(Preference preference) {
                        initializeIntentBottomSheet();
                        intentBottomSheet.show();
                        return true;
                    }

                });
    }
259547
public static void init(final Map<String, String> _values)
    {
        if (AppConfigHandler.HANDLER == null) {
            AppConfigHandler.HANDLER = new AppConfigHandler(_values);
        }
    }
229177
private boolean shouldStackButtons() {
        SharedPreferences sharedPreferences =
                PreferenceManager.getDefaultSharedPreferences(getActivity());
        String key = getString(R.string.stack_buttons_preference_key);
        boolean defaultValue =
                getResources().getBoolean(R.bool.stack_buttons_preference_default_value);
        return sharedPreferences.getBoolean(key, defaultValue);
    }
1115118
private void initializeNavigationWidth(final SharedPreferences sharedPreferences) {
        String key = getString(R.string.navigation_width_preference_key);
        String defaultValue = getString(R.string.navigation_width_preference_default_value);
        int width = Integer.valueOf(sharedPreferences.getString(key, defaultValue));
        setNavigationWidth(dpToPixels(this, width));
    }
299434
public void load(@Nonnull final Preferences preferences) {
    this.config.loadFrom(preferences);
    loadFrom(this.config, preferences);
    this.changeNotificationAllowed = false;
    try {
      // Common behaviour options
      this.checkBoxShowHiddenFiles.setSelected(preferences.getBoolean("showHiddenFiles", true)); //NOI18N
      this.checkboxTrimTopicText.setSelected(preferences.getBoolean("trimTopicText", false)); //NOI18N
      this.checkboxUseInsideBrowser.setSelected(preferences.getBoolean("useInsideBrowser", false)); //NOI18N
      this.checkboxRelativePathsForFilesInTheProject.setSelected(preferences.getBoolean("makeRelativePathToProject", true)); //NOI18N
      this.checkBoxUnfoldCollapsedTarget.setSelected(preferences.getBoolean("unfoldCollapsedTarget", true)); //NOI18N
      this.checkBoxCopyColorInfoToNewAllowed.setSelected(preferences.getBoolean("copyColorInfoToNewChildAllowed", true)); //NOI18N
      this.checkBoxKnowledgeFolderAutogenerationAllowed.setSelected(preferences.getBoolean(PREFERENCE_KEY_KNOWLEDGEFOLDER_ALLOWED, false));

      // third part options
      final String pathToGraphViz = preferences.get("plantuml.dotpath", null);
      this.textFieldPathToGraphvizDot.setText(pathToGraphViz == null ? "" : pathToGraphViz);

      // Metrics
      this.checkboxMetricsAllowed.setSelected(MetricsService.getInstance().isEnabled());
    } finally {
      this.changeNotificationAllowed = true;
    }
  }