@Override
    public boolean onCreateOptionsMenu(final Menu menu) {
        getMenuInflater().inflate(R.menu.settings_activity_options, menu);

        // prepare search in action bar
        final SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
        final MenuItem menuSearch = menu.findItem(R.id.menu_gosearch);
        final SearchView searchView = (SearchView) menuSearch.getActionView();
        searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
        searchView.setSuggestionsAdapter(new SettingsSuggestionsAdapter(this, searchIndex));

        SearchUtils.hideKeyboardOnSearchClick(searchView, menuSearch);
        SearchUtils.hideActionIconsWhenSearchIsActive(this, menu, menuSearch);
        SearchUtils.handleDropDownVisibility(this, searchView, menuSearch);

        return true;
    }
This method sets the fragment given by its base key,
and optionally starts scrolling to a preference identified by its key
main/src/main/java/cgeo/geocaching/settings/SettingsActivity.java