android-components / mozilla.components.feature.toolbar / ToolbarFeature

ToolbarFeature

class ToolbarFeature : LifecycleAwareFeature, UserInteractionHandler (source)

Feature implementation for connecting a toolbar implementation with the session module.

Types

Name Summary
RenderStyle sealed class RenderStyle
Controls how the url should be styled
UrlRenderConfiguration data class UrlRenderConfiguration
Configuration that controls how URLs are rendered.

Constructors

Name Summary
<init> ToolbarFeature(toolbar: Toolbar, store: BrowserStore, loadUrlUseCase: LoadUrlUseCase, searchUseCase: SearchUseCase? = null, customTabId: String? = null, urlRenderConfiguration: UrlRenderConfiguration? = null)
Feature implementation for connecting a toolbar implementation with the session module.

Functions

Name Summary
onBackPressed fun onBackPressed(): Boolean
Handler for back pressed events in activities that use this feature.
start fun start(): Unit
Start feature: App is in the foreground.
stop fun stop(): Unit
Stop feature: App is in the background.

Inherited Functions

Name Summary
onHomePressed open fun onHomePressed(): Boolean
In most cases, when the home button is pressed, we invoke this callback to inform the app that the user is going to leave the app.

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.