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


class BrowserAwesomeBar : RecyclerView, AwesomeBar (source)

A customizable AwesomeBar implementation.


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


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.


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. This method is not thread-safe and must be invoked on the main thread.
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(): View
Casts this awesome bar to an Android View object.

Extension Properties

Name Summary
isLTR val View.isLTR: Boolean
Is the horizontal layout direction of this view from Left to Right?
isRTL val View.isRTL: Boolean
Is the horizontal layout direction of this view from Right to Left?

Extension Functions

Name Summary
forEach fun ViewGroup.forEach(action: (View) -> Unit): Unit
Performs the given action on each View in this ViewGroup.
hideKeyboard fun View.hideKeyboard(): Unit
Hides the soft input window.
isGone fun View.isGone(): Boolean
Returns true if this view’s visibility is set to View.GONE.
isInvisible fun View.isInvisible(): Boolean
Returns true if this view’s visibility is set to View.INVISIBLE.
isVisible fun View.isVisible(): Boolean
Returns true if this view’s visibility is set to View.VISIBLE.
setPadding fun View.setPadding(padding: Padding): Unit
Set a padding using Padding object.
showKeyboard fun View.showKeyboard(flags: Int = InputMethodManager.SHOW_IMPLICIT): Unit
Tries to focus this view and show the soft input window for it.