android-components / mozilla.components.browser.awesomebar / BrowserAwesomeBar

BrowserAwesomeBar

class BrowserAwesomeBar : RecyclerView, AwesomeBar (source)

A customizable AwesomeBar implementation.

Constructors

Name Summary
<init> BrowserAwesomeBar(context: <ERROR CLASS>, attrs: <ERROR CLASS>? = null, defStyleAttr: Int = 0)
A customizable AwesomeBar implementation.

Properties

Name Summary
layout var layout: SuggestionLayout
The SuggestionLayout implementation controls layout inflation and view binding for suggestions.
transformer var transformer: SuggestionTransformer?
An optional SuggestionTransformer that receives AwesomeBar.Suggestion objects from a AwesomeBar.SuggestionProvider and returns a new list of transformed AwesomeBar.Suggestion objects.

Functions

Name Summary
addProviders fun addProviders(vararg providers: SuggestionProvider): Unit
Adds the following SuggestionProvider instances to be queried for Suggestions whenever the text changes.
getUniqueSuggestionId fun getUniqueSuggestionId(suggestion: Suggestion): Long
Returns a unique suggestion ID to make sure ID’s can’t collide across providers.
onDetachedFromWindow fun onDetachedFromWindow(): Unit
onInputCancelled fun onInputCancelled(): Unit
Fired when the user has cancelled their interaction with the awesome bar.
onInputChanged fun onInputChanged(text: String): Unit
Fired whenever the user changes their input, after they have started interacting with the awesome bar.
onInputStarted fun onInputStarted(): Unit
Fired when the user starts interacting with the awesome bar by entering text in the toolbar.
removeAllProviders fun removeAllProviders(): Unit
Removes all SuggestionProviders
removeProviders fun removeProviders(vararg providers: SuggestionProvider): Unit
Removes the following SuggestionProvider
setOnStopListener fun setOnStopListener(listener: () -> Unit): Unit
Adds a lambda to be invoked when the user has finished interacting with the awesome bar (e.g. selected a suggestion).

Inherited Functions

Name Summary
asView open fun asView(): <ERROR CLASS>
Casts this awesome bar to an Android View object.