android-components / mozilla.components.feature.customtabs / CustomTabsToolbarFeature

CustomTabsToolbarFeature

class CustomTabsToolbarFeature : LifecycleAwareFeature, BackHandler (source)

Initializes and resets the Toolbar for a Custom Tab based on the CustomTabConfig.

Constructors

Name Summary
<init> CustomTabsToolbarFeature(sessionManager: SessionManager, toolbar: BrowserToolbar, sessionId: String? = null, menuBuilder: BrowserMenuBuilder? = null, menuItemIndex: Int = menuBuilder?.items?.size ?: 0, window: <ERROR CLASS>? = null, shareListener: () -> Unit = null, closeListener: () -> Unit)
Initializes and resets the Toolbar for a Custom Tab based on the CustomTabConfig.

Functions

Name Summary
onBackPressed fun onBackPressed(): Boolean
When the back button is pressed if not initialized returns false, when initialized removes the current Custom Tabs session and returns true. Should be called when the back button is pressed.
start fun start(): Unit
stop fun stop(): Unit

Companion Object Properties

Name Summary
TITLE_TEXT_SIZE const val TITLE_TEXT_SIZE: Float
URL_TEXT_SIZE const val URL_TEXT_SIZE: Float