Package 

Class SearchConfiguration

    • Constructor Detail

      • SearchConfiguration

        SearchConfiguration(AppCompatActivity activity)
        Creates a new search configuration
        Parameters:
        activity - The Activity that receives callbacks.
    • Method Detail

      • setHistoryEnabled

         void setHistoryEnabled(boolean historyEnabled)

        Show a history of recent search terms if nothing was typed yet. Default is true

        Parameters:
        historyEnabled - True if history should be enabled
      • setHistoryId

         void setHistoryId(String historyId)

        Sets the id to use for saving the history. Preference screens with the same history id will share the samehistory. The default id is null (no id).

        Parameters:
        historyId - the history id
      • setBreadcrumbsEnabled

         void setBreadcrumbsEnabled(boolean breadcrumbsEnabled)

        Show breadcrumbs in the list of search results, containing ofthe prefix given in addResourceFileToIndex, PreferenceCategory and PreferenceScreen.Default is false

        Parameters:
        breadcrumbsEnabled - True if breadcrumbs should be shown
      • setFuzzySearchEnabled

         void setFuzzySearchEnabled(boolean fuzzySearchEnabled)

        Allow to enable and disable fuzzy searching. Default is true

        Parameters:
        fuzzySearchEnabled - True if search should be fuzzy
      • setSearchBarEnabled

         void setSearchBarEnabled(boolean searchBarEnabled)

        Show the search bar above the list. When setting this to false, you have to use {@see SearchPreferenceFragment#setSearchTerm(String) setSearchTerm} insteadDefault is true

        Parameters:
        searchBarEnabled - True if search bar should be shown
      • setActivity

         void setActivity(@NonNull() AppCompatActivity activity)

        Sets the current activity that also receives callbacks

        Parameters:
        activity - The Activity that receives callbacks.
      • setFragmentContainerViewId

         void setFragmentContainerViewId(@IdRes() int containerResId)

        Sets the container to use when loading the fragment

        Parameters:
        containerResId - Resource id of the container
      • useAnimation

         void useAnimation(int centerX, int centerY, int width, int height, int colorAccent)

        Display a reveal animation

        Parameters:
        centerX - Origin of the reveal animation
        centerY - Origin of the reveal animation
        width - Size of the main container
        height - Size of the main container
        colorAccent - Accent color to use