android-searchbox  v0.0.1
A multi-purpose search widget which works both with offline and online databases(Appbase or ElasticSearch cluster). The search widget contains multiple functionalities like Voice Search, Smart Search, Analytics, etc.
com.harsh.searchwidget.Adapter.SuggestionsAdapter< S, V extends RecyclerView.ViewHolder > Class Template Referenceabstract
Inheritance diagram for com.harsh.searchwidget.Adapter.SuggestionsAdapter< S, V extends RecyclerView.ViewHolder >:

Classes

interface  OnItemViewClickListener
 

Public Member Functions

 SuggestionsAdapter (LayoutInflater inflater)
 
void addSuggestion (S r)
 
void setSuggestions (List< S > suggestions)
 
void clearSuggestions ()
 
void deleteSuggestion (int position, S r)
 
List< S > getSuggestions ()
 
int getMaxSuggestionsCount ()
 
void setMaxSuggestionsCount (int maxSuggestionsCount)
 
void onBindViewHolder (V holder, int position)
 
abstract void onBindSuggestionHolder (S suggestion, V holder, int position)
 
abstract int getSingleViewHeight ()
 
int getListHeight ()
 
int getItemCount ()
 
Filter getFilter ()
 

Protected Member Functions

LayoutInflater getLayoutInflater ()
 

Protected Attributes

List< S > suggestions = new ArrayList<>()
 
List< S > suggestions_clone = new ArrayList<>()
 
int maxSuggestionsCount = 5
 

Member Function Documentation

◆ getFilter()

Filter com.harsh.searchwidget.Adapter.SuggestionsAdapter< S, V extends RecyclerView.ViewHolder >.getFilter ( )

Returns a filter that can be used to constrain data with a filtering pattern.

This method is usually implemented by Adapter classes.

Returns
a filter used to constrain data

◆ getSingleViewHeight()

abstract int com.harsh.searchwidget.Adapter.SuggestionsAdapter< S, V extends RecyclerView.ViewHolder >.getSingleViewHeight ( )
abstract

Returns the height of single view item in list. Note that all views must have the same height

Returns
height

The documentation for this class was generated from the following file: