android-components / mozilla.components.browser.awesomebar.layout / DefaultSuggestionLayout

DefaultSuggestionLayout

class DefaultSuggestionLayout : SuggestionLayout (source)

Default implementation of SuggestionLayout to be used by BrowserAwesomeBar.

Constructors

Name Summary
<init> DefaultSuggestionLayout()
Default implementation of SuggestionLayout to be used by BrowserAwesomeBar.

Functions

Name Summary
createViewHolder fun createViewHolder(awesomeBar: BrowserAwesomeBar, view: <ERROR CLASS>, layoutId: Int): SuggestionViewHolder
Creates and returns a SuggestionViewHolder instance for the provided View. The BrowserAwesomeBar will call SuggestionViewHolder.bind once this view holder should display the data of a specific AwesomeBar.Suggestion.
getLayoutResource fun getLayoutResource(suggestion: Suggestion): Int
Returns a layout resource ID to be used for this suggestion. The BrowserAwesomeBar implementation will take care of inflating the layout or re-using instances as needed.