android-components / mozilla.components.feature.findinpage / FindInPageFeature

FindInPageFeature

class FindInPageFeature : LifecycleAwareFeature, UserInteractionHandler (source)

Feature implementation that will keep a FindInPageView in sync with a bound SessionState.

Constructors

Name Summary
<init> FindInPageFeature(store: BrowserStore, view: FindInPageView, engineView: EngineView, onClose: () -> Unit = null)
Feature implementation that will keep a FindInPageView in sync with a bound SessionState.

Functions

Name Summary
bind fun bind(session: SessionState): Unit
Binds this feature to the given SessionState. Until unbound the FindInPageView will be updated presenting the current “Find in Page” state.
onBackPressed fun onBackPressed(): Boolean
Returns true if the back button press was handled and the feature unbound from a session.
start fun start(): Unit
stop fun stop(): Unit
unbind fun unbind(): Unit
Unbinds the feature from a previously bound SessionState. The FindInPageView will be cleared and not be updated to present the “Find in Page” state anymore.

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.