android-components / mozilla.components.feature.session / FullScreenFeature


open class FullScreenFeature : SelectionAwareSessionObserver, LifecycleAwareFeature, UserInteractionHandler (source)

Feature implementation for handling fullscreen mode (exiting and back button presses).


Name Summary
<init> FullScreenFeature(sessionManager: SessionManager, sessionUseCases: SessionUseCases, sessionId: String? = null, fullScreenChanged: (Boolean) -> Unit)
Feature implementation for handling fullscreen mode (exiting and back button presses).

Inherited Properties

Name Summary
activeSession open var activeSession: Session?
the currently observed session


Name Summary
onBackPressed open fun onBackPressed(): Boolean
To be called when the back button is pressed, so that only fullscreen mode closes.
onFullScreenChanged open fun onFullScreenChanged(session: Session, enabled: Boolean): Unit
start open fun start(): Unit
Starts the feature and a observer to listen for fullscreen changes.

Inherited Functions

Name Summary
observeFixed fun observeFixed(session: Session): Unit
Starts observing changes to the specified session.
observeIdOrSelected fun observeIdOrSelected(sessionId: String?): Unit
Starts observing changes to the session matching the sessionId. If the session does not exist, then observe the selected session.
observeSelected fun observeSelected(): Unit
Starts observing changes to the selected session (see SessionManager.selectedSession). If a different session is selected the observer will automatically be switched over and only notified of changes to the newly selected session.
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.
onSessionSelected open fun onSessionSelected(session: Session): Unit
The selection has changed and the given session is now the selected session.
stop open fun stop(): Unit
Stops the observer.

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.