android-components / mozilla.components.browser.domains / DomainAutoCompleteProvider

DomainAutoCompleteProvider

class ~~DomainAutoCompleteProvider~~ (source) Deprecated: Use ShippedDomainsProvider or CustomDomainsProvider

Provides autocomplete functionality for domains, based on a provided list of assets (see Domains) and/or a custom domain list managed by CustomDomains.

Types

Name Summary
AutocompleteSource object AutocompleteSource
Result data class Result
Represents a result of auto-completion.

Constructors

Name Summary
<init> DomainAutoCompleteProvider()
Provides autocomplete functionality for domains, based on a provided list of assets (see Domains) and/or a custom domain list managed by CustomDomains.

Functions

Name Summary
autocomplete fun autocomplete(rawText: String): Result
Computes an autocomplete suggestion for the given text, and invokes the provided callback, passing the result.
initialize fun initialize(context: <ERROR CLASS>, useShippedDomains: Boolean = true, useCustomDomains: Boolean = false, loadDomainsFromDisk: Boolean = true): Unit
Initializes this provider instance by making sure the shipped and/or custom domains are loaded.

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.