Search in sources :

Example 1 with SearchConfiguration

use of com.bytehamster.lib.preferencesearch.SearchConfiguration in project AntennaPod by AntennaPod.

the class MainPreferencesFragment method setupSearch.

private void setupSearch() {
    SearchPreference searchPreference = findPreference("searchPreference");
    SearchConfiguration config = searchPreference.getSearchConfiguration();
    config.setActivity((AppCompatActivity) getActivity());
    config.setFragmentContainerViewId(R.id.settingsContainer);
    config.setBreadcrumbsEnabled(true);
    config.index(R.xml.preferences_user_interface).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_user_interface));
    config.index(R.xml.preferences_playback).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_playback));
    config.index(R.xml.preferences_network).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_network));
    config.index(R.xml.preferences_storage).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_storage));
    config.index(R.xml.preferences_import_export).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_storage)).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_import_export));
    config.index(R.xml.preferences_autodownload).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_network)).addBreadcrumb(R.string.automation).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_autodownload));
    config.index(R.xml.preferences_synchronization).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_synchronization));
    config.index(R.xml.preferences_notifications).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_notifications));
    config.index(R.xml.feed_settings).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.feed_settings));
    config.index(R.xml.preferences_swipe).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_user_interface)).addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_swipe));
}
Also used : SearchConfiguration(com.bytehamster.lib.preferencesearch.SearchConfiguration) SearchPreference(com.bytehamster.lib.preferencesearch.SearchPreference)

Aggregations

SearchConfiguration (com.bytehamster.lib.preferencesearch.SearchConfiguration)1 SearchPreference (com.bytehamster.lib.preferencesearch.SearchPreference)1