android-components / mozilla.components.feature.customtabs / CustomTabsToolbarFeature / <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.


toolbar - Reference to the browser toolbar, so that the color and menu items can be set.

sessionId - ID of the custom tab session. No-op if null or invalid.

menuBuilder - Menu builder reference to pull menu options from.

menuItemIndex - Location to insert any custom menu options into the predefined menu list.

window - Reference to the window so the navigation bar color can be set.

shareListener - Invoked when the share button is pressed.

closeListener - Invoked when the close button is pressed.