CustomTabsIntent

public final class CustomTabsIntent
extends Object

java.lang.Object
   ↳ androidx.browser.customtabs.CustomTabsIntent


Class holding the Intent and start bundle for a Custom Tabs Activity.

Note: The constants below are public for the browser implementation's benefit. You are strongly encouraged to use CustomTabsIntent.Builder.

Summary

Nested classes

class CustomTabsIntent.Builder

Builder class for CustomTabsIntent objects. 

Constants

int COLOR_SCHEME_DARK

Applies a dark color scheme to the user interface in the custom tab.

int COLOR_SCHEME_LIGHT

Applies a light color scheme to the user interface in the custom tab.

int COLOR_SCHEME_SYSTEM

Applies either a light or dark color scheme to the user interface in the custom tab depending on the user's system settings.

String EXTRA_ACTION_BUTTON_BUNDLE

Bundle used for adding a custom action button to the custom tab toolbar.

String EXTRA_CLOSE_BUTTON_ICON

Extra bitmap that specifies the icon of the back button on the toolbar.

String EXTRA_COLOR_SCHEME

Extra (int) that specifies which color scheme should be applied to the custom tab.

String EXTRA_COLOR_SCHEME_PARAMS

Extra that contains a SparseArray, mapping color schemes (except COLOR_SCHEME_SYSTEM) to Bundle representing CustomTabColorSchemeParams.

String EXTRA_DEFAULT_SHARE_MENU_ITEM

This constant is deprecated. Use EXTRA_SHARE_STATE instead.

String EXTRA_ENABLE_INSTANT_APPS

Extra that specifies whether Instant Apps is enabled.

String EXTRA_ENABLE_URLBAR_HIDING

Boolean extra that enables the url bar to hide as the user scrolls down the page

String EXTRA_EXIT_ANIMATION_BUNDLE

Bundle constructed out of ActivityOptionsCompat that will be running when the Activity that holds the custom tab gets finished.

String EXTRA_MENU_ITEMS

Use an ArrayList<Bundle> for specifying menu related params.

String EXTRA_NAVIGATION_BAR_COLOR

Extra that contains the color of the navigation bar.

String EXTRA_NAVIGATION_BAR_DIVIDER_COLOR

Extra that contains the color of the navigation bar divider.

String EXTRA_REMOTEVIEWS

Extra that specifies the RemoteViews showing on the secondary toolbar.

String EXTRA_REMOTEVIEWS_CLICKED_ID

Extra that specifies which View has been clicked.

String EXTRA_REMOTEVIEWS_PENDINGINTENT

Extra that specifies the PendingIntent to be sent when the user clicks on the Views that is listed by EXTRA_REMOTEVIEWS_VIEW_IDS.

String EXTRA_REMOTEVIEWS_VIEW_IDS

Extra that specifies an array of View ids.

String EXTRA_SECONDARY_TOOLBAR_COLOR

Extra that changes the background color for the secondary toolbar.

String EXTRA_SESSION

Extra used to match the session.

String EXTRA_SHARE_STATE

Extra (int) that specifies which share state should be applied to the custom tab.

String EXTRA_TINT_ACTION_BUTTON

Extra boolean that specifies whether the custom action button should be tinted.

String EXTRA_TITLE_VISIBILITY_STATE

Extra (int) that specifies state for showing the page title.

String EXTRA_TOOLBAR_COLOR

Extra that changes the background color for the toolbar.

String EXTRA_TOOLBAR_ITEMS

List used for adding items to the top and bottom toolbars.

String KEY_DESCRIPTION

Key that specifies the content description for the custom action button.

String KEY_ICON

Key that specifies the Bitmap to be used as the image source for the action button.

String KEY_ID

Key that specifies the unique ID for an action button.

String KEY_MENU_ITEM_TITLE

Key for specifying the title of a menu item.

String KEY_PENDING_INTENT

Key that specifies the PendingIntent to launch when the action button or menu item was clicked.

int NO_TITLE

Don't show any title.

int SHARE_STATE_DEFAULT

Applies the default share settings depending on the browser.

int SHARE_STATE_OFF

Explicitly does not show a share option in the tab.

int SHARE_STATE_ON

Shows a share option in the tab.

int SHOW_PAGE_TITLE

Shows the page title and the domain.

int TOOLBAR_ACTION_BUTTON_ID

The ID allocated to the custom action button that is shown on the toolbar.

Fields

public final Intent intent

An