SearchContentViewGenerator

public final class SearchContentViewGenerator


The class to generate the search content UI view based on the search content data and the customization options.

Summary

Public methods

int

Gets the number of search content blocks inside this generator.

SearchContentViewOptions

Gets the view's customization options.

void

Loads more search content blocks.

View
populateView(Context context, int index)

Generates the search content UI view for a certain search content block.

void
updateView(View view, Context context)

Updates the search content UI view generated from populateView to match the most updated customization option.

Public methods

getSearchContentBlockCount

public int getSearchContentBlockCount()

Gets the number of search content blocks inside this generator.

Returns
int

the number of search content blocks inside this generator

getSearchContentViewOptions

public SearchContentViewOptions getSearchContentViewOptions()

Gets the view's customization options.

Returns
SearchContentViewOptions

the current SearchContentViewOptions object.

loadMoreSearchContent

public void loadMoreSearchContent(GetSearchContentViewGeneratorCallback callback)

Loads more search content blocks.

Parameters
GetSearchContentViewGeneratorCallback callback

callback to be invoked when more search content blocks are loaded.

populateView

public View populateView(Context context, int index)

Generates the search content UI view for a certain search content block.

Parameters
Context context

Activity context.

int index

the index of the targeted search content block.

updateView

public void updateView(View view, Context context)

Updates the search content UI view generated from populateView to match the most updated customization option.

Parameters
View view

the view to be updated.

Context context

Activity context.