Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

CustomTabsIntent

class CustomTabsIntent
kotlin.Any
   ↳ 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

Builder class for CustomTabsIntent objects.

Constants
static Int

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

static Int

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

static Int

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

static String

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

static String

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

static String

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

static String

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

static String

Boolean extra that specifies whether a default share button will be shown in the menu.

static String

Extra that specifies whether Instant Apps is enabled.

static String

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

static String

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

static String

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

static String

Extra that contains the color of the navigation bar.

static String

Extra that contains the color of the navigation bar divider.

static String

Extra that specifies the RemoteViews showing on the secondary toolbar.

static String

Extra that specifies which View has been clicked.

static String

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

static String

Extra that specifies an array of View ids.

static String

Extra that changes the background color for the secondary toolbar.

static String

Extra used to match the session.

static String

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

static String

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

static String

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

static String

Extra that changes the background color for the toolbar.

static String

List used for adding items to the top and bottom toolbars. The client should provide an ID, a description, an icon Bitmap for each item. They may also provide a PendingIntent if the item is a button.

static String

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

static String

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

static String

Key that specifies the unique ID for an action button.

static String

Key for specifying the title of a menu item.

static String

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

static Int

Don't show any title.

static Int

Applies the default share settings depending on the browser.

static Int

Explicitly does not show a share option in the tab.

static Int

Shows a share option in the tab.

static Int

Shows the page title and the domain.

static Int

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

Public methods
static CustomTabColorSchemeParams
getColorSchemeParams(@NonNull intent: Intent, colorScheme: Int)

Retrieves the instance of CustomTabColorSchemeParams from an Intent for a given color scheme.

static Int

Unit
launchUrl(@NonNull context: Context, @NonNull url: Uri)

Convenience method to launch a Custom Tabs Activity.

static Intent
setAlwaysUseBrowserUI(@Nullable intent: Intent?)

Adds the necessary flags and extras to signal any browser supporting custom tabs to use the browser UI at all times and avoid showing custom tab like UI.

static Boolean
shouldAlwaysUseBrowserUI(@NonNull intent: Intent)

Whether a browser receiving the given intent should always use browser UI and avoid using any custom tabs UI.

Properties
Intent

An Intent used to start the Custom Tabs Activity.

Bundle?

A Bundle containing the start animation for the Custom Tabs Activity.

Constants

COLOR_SCHEME_DARK

static val COLOR_SCHEME_DARK: Int

Applies a dark color scheme to the user interface in the custom tab. Colors set through EXTRA_TOOLBAR_COLOR may be darkened to match user expectations.

Value: 2

COLOR_SCHEME_LIGHT

static val COLOR_SCHEME_LIGHT: Int

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

Value: 1

COLOR_SCHEME_SYSTEM

static val COLOR_SCHEME_SYSTEM: Int

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

Value: 0

EXTRA_ACTION_BUTTON_BUNDLE

static val EXTRA_ACTION_BUTTON_BUNDLE: String

Bundle used for adding a custom action button to the custom tab toolbar. The client should provide a description, an icon Bitmap and a PendingIntent for the button. All three keys must be present.

Value: "android.support.customtabs.extra.ACTION_BUTTON_BUNDLE"

EXTRA_CLOSE_BUTTON_ICON

static val EXTRA_CLOSE_BUTTON_ICON: String

Extra bitmap that specifies the icon of the back button on the toolbar. If the client chooses not to customize it, a default close button will be used.

Value: "android.support.customtabs.extra.CLOSE_BUTTON_ICON"

EXTRA_COLOR_SCHEME

static val EXTRA_COLOR_SCHEME: String

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

Value: "androidx.browser.customtabs.extra.COLOR_SCHEME"

EXTRA_COLOR_SCHEME_PARAMS

static val EXTRA_COLOR_SCHEME_PARAMS: String

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

Value: "androidx.browser.customtabs.extra.COLOR_SCHEME_PARAMS"

EXTRA_DEFAULT_SHARE_MENU_ITEM

static val EXTRA_DEFAULT_SHARE_MENU_ITEM: String

Deprecated: Use CustomTabsIntent#EXTRA_SHARE_STATE instead.

Boolean extra that specifies whether a default share button will be shown in the menu.

Value: "android.support.customtabs.extra.SHARE_MENU_ITEM"

EXTRA_ENABLE_INSTANT_APPS

static val EXTRA_ENABLE_INSTANT_APPS: String

Extra that specifies whether Instant Apps is enabled.

Value: "android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS"

EXTRA_ENABLE_URLBAR_HIDING

static val EXTRA_ENABLE_URLBAR_HIDING: String

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

Value: "android.support.customtabs.extra.ENABLE_URLBAR_HIDING"

EXTRA_EXIT_ANIMATION_BUNDLE

static val EXTRA_EXIT_ANIMATION_BUNDLE: String

Bundle constructed out of ActivityOptionsCompat that will be running when the Activity that holds the custom tab gets finished. A similar ActivityOptions for creation should be constructed and given to the startActivity() call that launches the custom tab.

Value: "android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE"

EXTRA_MENU_ITEMS

static val EXTRA_MENU_ITEMS: String

Use an ArrayList<Bundle> for specifying menu related params. There should be a separate Bundle for each custom menu item.

Value: "android.support.customtabs.extra.MENU_ITEMS"

EXTRA_NAVIGATION_BAR_COLOR

static val EXTRA_NAVIGATION_BAR_COLOR: String

Extra that contains the color of the navigation bar. See Builder#setNavigationBarColor.

Value: "androidx.browser.customtabs.extra.NAVIGATION_BAR_COLOR"

EXTRA_NAVIGATION_BAR_DIVIDER_COLOR

static val EXTRA_NAVIGATION_BAR_DIVIDER_COLOR: String

Extra that contains the color of the navigation bar divider. See Builder#setNavigationBarDividerColor.

Value: "androidx.browser.customtabs.extra.NAVIGATION_BAR_DIVIDER_COLOR"

EXTRA_REMOTEVIEWS

static val EXTRA_REMOTEVIEWS: String

Extra that specifies the RemoteViews showing on the secondary toolbar. If this extra is set, the other secondary toolbar configurations will be overriden. The height of the RemoteViews should not exceed 56dp.

Value: "android.support.customtabs.extra.EXTRA_REMOTEVIEWS"

EXTRA_REMOTEVIEWS_CLICKED_ID

static val EXTRA_REMOTEVIEWS_CLICKED_ID: String

Extra that specifies which View has been clicked. This extra will be put to the PendingIntent sent from Custom Tabs when a view in the