android-components / mozilla.components.feature.awesomebar.provider / ClipboardSuggestionProvider

ClipboardSuggestionProvider

class ClipboardSuggestionProvider : SuggestionProvider (source)

An AwesomeBar.SuggestionProvider implementation that returns a suggestions for an URL in the clipboard (if there’s any).

Constructors

Name Summary
<init> ClipboardSuggestionProvider(context: <ERROR CLASS>, loadUrlUseCase: LoadUrlUseCase, icon: <ERROR CLASS>? = null, title: String? = null, requireEmptyText: Boolean = true)
An AwesomeBar.SuggestionProvider implementation that returns a suggestions for an URL in the clipboard (if there’s any).

Properties

Name Summary
id val id: String
A unique ID used for identifying this provider.
shouldClearSuggestions val shouldClearSuggestions: Boolean
If true an AwesomeBar implementation can clear the previous suggestions of this provider as soon as the user continues to type. If this is false an AwesomeBar implementation is allowed to keep the previous suggestions around until the provider returns a new list of suggestions for the updated text.

Functions

Name Summary
onInputChanged suspend fun onInputChanged(text: String): List<Suggestion>
Fired whenever the user changes their input, after they have started interacting with the awesome bar.
onInputStarted fun onInputStarted(): List<Suggestion>
Fired when the user starts interacting with the awesome bar by entering text in the toolbar.

Inherited Functions

Name Summary
onInputCancelled open fun onInputCancelled(): Unit
Fired when the user has cancelled their interaction with the awesome bar.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.