android-components / mozilla.components.concept.engine / EngineView

EngineView

interface EngineView (source)

View component that renders web content.

Functions

Name Summary
asView open fun asView(): <ERROR CLASS>
Convenience method to cast the implementation of this interface to an Android View object.
canScrollVerticallyDown open fun canScrollVerticallyDown(): Boolean
Check if EngineView can be scrolled vertically down. true if can and false otherwise.
canScrollVerticallyUp open fun canScrollVerticallyUp(): Boolean
Check if EngineView can be scrolled vertically up. true if can and false otherwise.
captureThumbnail abstract fun captureThumbnail(onFinish: (<ERROR CLASS>?) -> Unit): Unit
Request a screenshot of the visible portion of the web page currently being rendered.
onCreate open fun onCreate(): Unit
To be called in response to Lifecycle.Event.ON_CREATE. See EngineView implementations for details.
onDestroy open fun onDestroy(): Unit
To be called in response to Lifecycle.Event.ON_DESTROY. See EngineView implementations for details.
onPause open fun onPause(): Unit
To be called in response to Lifecycle.Event.ON_PAUSE. See EngineView implementations for details.
onResume open fun onResume(): Unit
To be called in response to Lifecycle.Event.ON_RESUME. See EngineView implementations for details.
onStart open fun onStart(): Unit
To be called in response to Lifecycle.Event.ON_START. See EngineView implementations for details.
onStop open fun onStop(): Unit
To be called in response to Lifecycle.Event.ON_STOP. See EngineView implementations for details.
release abstract fun release(): Unit
Releases an EngineSession that is currently rendered by this view (after calling render).
render abstract fun render(session: EngineSession): Unit
Render the content of the given session.
setDynamicToolbarMaxHeight abstract fun setDynamicToolbarMaxHeight(height: Int): Unit
Sets the maximum height of the dynamic toolbar(s).
setVerticalClipping abstract fun setVerticalClipping(clippingHeight: Int): Unit
Updates the amount of vertical space that is clipped or visibly obscured in the bottom portion of the view. Tells the EngineView where to put bottom fixed elements so they are fully visible.

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.

Inheritors

Name Summary
GeckoEngineView class GeckoEngineView : EngineView
Gecko-based EngineView implementation.
SystemEngineView class SystemEngineView : EngineView
WebView-based implementation of EngineView.