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

BrowserAwesomeBar

class BrowserAwesomeBar : RecyclerView, AwesomeBar (source)

A customizable AwesomeBar implementation.

Constructors

<init>

BrowserAwesomeBar(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

A customizable AwesomeBar implementation.

Functions

addProviders

fun addProviders(vararg providers: SuggestionProvider): Unit

Adds the following SuggestionProvider instances to be queried for Suggestions whenever the text changes.

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.

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

asView

open fun asView(): View

Casts this awesome bar to an Android View object.

Extension Properties

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

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.