Interface SearchHistory


public interface SearchHistory
Search history
Since:
1.1
  • Method Details

    • setSearchHistorySize

      void setSearchHistorySize(int maxSearchHistoryItemsCount)
      Set search history items maximum count. Default is 20.
      Parameters:
      maxSearchHistoryItemsCount - search history size. if maxSearchHistoryItemsCount is zero (or less than zero) no search history items are saved.
      Since:
      1.1
    • addSearchResult

      void addSearchResult(@NonNull String searchHistoryCategory, @NonNull SearchResult searchResult)
      Add search result to history
      Parameters:
      searchHistoryCategory - search history category (added in version 4.6)
      searchResult - search result to add to search history
      Since:
      1.1
    • removeSearchResult

      boolean removeSearchResult(@NonNull String searchResultId)
      Remove search result from search history
      Parameters:
      searchResultId - search result ID to remove
      Returns:
      true when the search result existed and was deleted, false otherwise
      Since:
      4.7
    • clearSearchHistory

      void clearSearchHistory()
      Remove all search history results
      Since:
      4.7
    • getSearchHistoryResults

      @NonNull List<SearchHistoryResult> getSearchHistoryResults(@Nullable String searchHistoryCategory)
      Get search history results list within given category
      Parameters:
      searchHistoryCategory - category to get search history results, null to get all search history results
      Returns:
      list of search history results
      Since:
      4.6