# CustomTabsIntent.Builder

Artifact: [androidx.browser:browser](https://developer.android.com/jetpack/androidx/releases/browser) [View Source](https://cs.android.com/search?q=file:androidx/browser/customtabs/CustomTabsIntent.java+class:androidx.browser.customtabs.CustomTabsIntent.Builder) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

*** ** * ** ***

<br />

```
class CustomTabsIntent.Builder
```

<br />

*** ** * ** ***

Builder class for `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#Builder()()` Creates a `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` object associated with no `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession`. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#Builder(androidx.browser.customtabs.CustomTabsSession)(session: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession?)` Creates a `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` object associated with a given `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession`. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `@https://developer.android.com/reference/kotlin/androidx/browser/customtabs/ExperimentalCustomContentAction https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#addCustomContentAction(androidx.browser.customtabs.CustomContentAction)(action: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction)` Adds a custom content action that can be invoked by the user on specific content types (image or link) within the Custom Tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `[addDefaultShareMenuItem](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#addDefaultShareMenuItem())()` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setShareState(int)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#addMenuItem(java.lang.String,android.app.PendingIntent)(label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html)` Adds a menu item. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `[addToolbarItem](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#addToolbarItem(int,android.graphics.Bitmap,java.lang.String,android.app.PendingIntent))( id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, icon: https://developer.android.com/reference/android/graphics/Bitmap.html, description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html )` **This function is deprecated.** Use CustomTabsIntent.Builder#setSecondaryToolbarViews(RemoteViews, int\[\], PendingIntent). <br /> |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#build()()` Combines all the options that have been set and returns a new `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent` object. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `[enableUrlBarHiding](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#enableUrlBarHiding())()` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setUrlBarHidingEnabled(boolean)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActionButton(android.graphics.Bitmap,java.lang.String,android.app.PendingIntent)( icon: https://developer.android.com/reference/android/graphics/Bitmap.html, description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html )` Sets the action button that is displayed in the Toolbar with default tinting behavior. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActionButton(android.graphics.Bitmap,java.lang.String,android.app.PendingIntent,boolean)( icon: https://developer.android.com/reference/android/graphics/Bitmap.html, description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html, shouldTint: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Sets the action button that is displayed in the Toolbar. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActivitySideSheetBreakpointDp(int)(breakpointDp: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the Custom Tab Activity's transition breakpoint in DP. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActivitySideSheetDecorationType(int)(decorationType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the Custom Tab Activity's decoration type that will be displayed when it is acting as a side sheet. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActivitySideSheetMaximizationEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Enables or disables the maximization button for when the Custom Tab Activity is acting as a side sheet. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActivitySideSheetPosition(int)(position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the Custom Tab Activity's position when acting as a side sheet. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActivitySideSheetRoundedCornersPosition(int)(roundedCornersPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the Custom Tab Activity's rounded corners position when it is acting as a side sheet. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setBackgroundInteractionEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Enables the capability of the interaction with background. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setBookmarksButtonEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Enables or disables the bookmarks button in the overflow menu. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setCloseButtonEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether to enable the close button for custom tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setCloseButtonIcon(android.graphics.Bitmap)(icon: https://developer.android.com/reference/android/graphics/Bitmap.html)` Sets the Close button icon for the custom tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setCloseButtonPosition(int)(position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the position of the close button. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setColorScheme(int)(colorScheme: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the color scheme that should be applied to the user interface in the custom tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setColorSchemeParams(int,androidx.browser.customtabs.CustomTabColorSchemeParams)( colorScheme: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, params: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams )` Sets `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams` for the given color scheme. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)(params: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams)` Sets the default `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams`. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `[setDefaultShareMenuItemEnabled](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultShareMenuItemEnabled(boolean))(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setShareState(int)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDownloadButtonEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Enables or disables the download button in the overflow menu. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setEphemeralBrowsingEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether to enable ephemeral browsing within the Custom Tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setExitAnimations(android.content.Context,int,int)( context: https://developer.android.com/reference/android/content/Context.html, enterResId: @https://developer.android.com/reference/kotlin/androidx/annotation/AnimRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, exitResId: @https://developer.android.com/reference/kotlin/androidx/annotation/AnimRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Sets the exit animations. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setInitialActivityHeightPx(int)(initialHeightPx: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the Custom Tab Activity's initial height in pixels with default resize behavior. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setInitialActivityHeightPx(int,int)( initialHeightPx: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, activityHeightResizeBehavior: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Sets the Custom Tab Activity's initial height in pixels and the desired resize behavior. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setInitialActivityWidthPx(int)(initialWidthPx: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the Custom Tab Activity's initial width in pixels. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `@https://developer.android.com/reference/kotlin/androidx/browser/customtabs/ExperimentalInitialNavigationCanLeaveBrowser https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setInitialNavigationAllowedToLeaveBrowser(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Allows the Custom Tab to forward the initial URL sent to the Custom Tab to the default handling app for that URL instead of loading it (including following any redirects) in the Custom Tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setInstantAppsEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether Instant Apps is enabled for this Custom Tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `[setNavigationBarColor](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setNavigationBarColor(int))(color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `[setNavigationBarDividerColor](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setNavigationBarDividerColor(int))(color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setNetwork(android.net.Network)(network: https://developer.android.com/reference/android/net/Network.html)` Sets the target network `https://developer.android.com/reference/android/net/Network.html` to bind when launching a custom tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setOpenInBrowserButtonState(int)(openInBrowserState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the state for the Open in Browser button in the toolbar for this Custom Tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setPendingSession(androidx.browser.customtabs.CustomTabsSession.PendingSession)(session: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession.PendingSession)` Associates the `https://developer.android.com/reference/android/content/Intent.html` with the given `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession.PendingSession`. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `[setSecondaryToolbarColor](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarColor(int))(color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarSwipeUpGesture(android.app.PendingIntent)(pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html?)` Sets the `https://developer.android.com/reference/android/app/PendingIntent.html` to be sent when the user swipes up from the secondary (bottom) toolbar. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarViews(android.widget.RemoteViews,int[],android.app.PendingIntent)( remoteViews: https://developer.android.com/reference/android/widget/RemoteViews.html, clickableIDs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>?, pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html? )` Sets the remote views displayed in the secondary toolbar in a custom tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setSendToExternalDefaultHandlerEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Enables sending any redirects off of the initial URL sent to the Custom Tab to default handling apps. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setSession(androidx.browser.customtabs.CustomTabsSession)(session: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession)` Associates the `https://developer.android.com/reference/android/content/Intent.html` with the given `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession`. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setShareIdentityEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Allow Custom Tabs to obtain the caller's identity i.e. package name. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setShareState(int)(shareState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the share state that should be applied to the custom tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setShowTitle(boolean)(showTitle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether the title should be shown in the custom tab. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setStartAnimations(android.content.Context,int,int)( context: https://developer.android.com/reference/android/content/Context.html, enterResId: @https://developer.android.com/reference/kotlin/androidx/annotation/AnimRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, exitResId: @https://developer.android.com/reference/kotlin/androidx/annotation/AnimRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Sets the start animations. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `[setToolbarColor](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setToolbarColor(int))(color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setToolbarCornerRadiusDp(int)(cornerRadiusDp: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the toolbar's top corner radii in dp. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setTranslateLocale(java.util.Locale)(locale: https://developer.android.com/reference/java/util/Locale.html)` Specifies the target locale the Translate UI should be triggered with. |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setUrlBarHidingEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Set whether the url bar should hide as the user scrolls down on the page. |

## Public constructors

### Builder

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
Builder()
```

Creates a `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` object associated with no `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession`.

### Builder

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
Builder(session: CustomTabsSession?)
```

Creates a `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` object associated with a given `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession`. Guarantees that the `https://developer.android.com/reference/android/content/Intent.html` will be sent to the same component as the one the session is associated with.

| Parameters |
|---|---|
| `session: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession?` | The session to associate this Builder with. |

## Public functions

### addCustomContentAction

Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

```
@ExperimentalCustomContentAction
fun addCustomContentAction(action: CustomContentAction): CustomTabsIntent.Builder
```

Adds a custom content action that can be invoked by the user on specific content types (image or link) within the Custom Tab.

The number of actions shown to the user is at the browser's discretion. The browser may choose not to display all the actions provided. Additionally, priority will be based on the order the actions were added, with the earliest added action being given the highest priority.

When the user triggers this action, the browser will send the `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction#getPendingIntent()` associated with this action. The `https://developer.android.com/reference/android/content/Intent.html` within the `https://developer.android.com/reference/android/app/PendingIntent.html` will include the current URL of the Custom Tab as its data, `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_TRIGGERED_CUSTOM_CONTENT_ACTION_ID()` with the ID of this action, `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_CLICKED_CONTENT_TARGET_TYPE()` with the type of content interacted with, and potentially other contextual extras (e.g., `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_CONTEXT_IMAGE_URL()`).

| Parameters |
|---|---|
| `action: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction` | The `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomContentAction` to add. Must not be null. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder` | This Builder. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if an action with the same ID has already been added. |

### addDefaultShareMenuItem

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun [addDefaultShareMenuItem](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#addDefaultShareMenuItem())(): CustomTabsIntent.Builder
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setShareState(int)` instead. This will set the share state to `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#SHARE_STATE_ON()`.

Adds a default share item to the menu.

### addMenuItem

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun addMenuItem(label: String, pendingIntent: PendingIntent): CustomTabsIntent.Builder
```

Adds a menu item.

| Parameters |
|---|---|
| `label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Menu label. |
| `pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html` | Pending intent delivered when the menu item is clicked. |

### addToolbarItem

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun [addToolbarItem](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#addToolbarItem(int,android.graphics.Bitmap,java.lang.String,android.app.PendingIntent))(
    id: Int,
    icon: Bitmap,
    description: String,
    pendingIntent: PendingIntent
): CustomTabsIntent.Builder
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use CustomTabsIntent.Builder#setSecondaryToolbarViews(RemoteViews, int\[\], PendingIntent).

Adds an action button to the custom tab. Multiple buttons can be added via this method. If the given id equals `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#TOOLBAR_ACTION_BUTTON_ID()`, the button will be placed on the toolbar; if the bitmap is too wide, it will be put to the bottom bar instead. If the id is not `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#TOOLBAR_ACTION_BUTTON_ID()`, it will be directly put on secondary toolbar. The maximum number of allowed toolbar items in a single intent is `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#getMaxToolbarItems()`. Throws an `https://developer.android.com/reference/java/lang/IllegalStateException.html` when that number is exceeded per intent.

| Parameters |
|---|---|
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The unique id of the action button. This should be non-negative. |
| `icon: https://developer.android.com/reference/android/graphics/Bitmap.html` | The icon. |
| `description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The description for the button. To be used for accessibility. |
| `pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html` | The pending intent delivered when the button is clicked. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` |   |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#getMaxToolbarItems()` |   |

### build

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun build(): CustomTabsIntent
```

Combines all the options that have been set and returns a new `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent` object.

### enableUrlBarHiding

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun [enableUrlBarHiding](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#enableUrlBarHiding())(): CustomTabsIntent.Builder
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setUrlBarHidingEnabled(boolean)` instead.

Enables the url bar to hide as the user scrolls down on the page.

### setActionButton

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setActionButton(
    icon: Bitmap,
    description: String,
    pendingIntent: PendingIntent
): CustomTabsIntent.Builder
```

Sets the action button that is displayed in the Toolbar with default tinting behavior.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActionButton(android.graphics.Bitmap,java.lang.String,android.app.PendingIntent,boolean)` |   |

### setActionButton

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setActionButton(
    icon: Bitmap,
    description: String,
    pendingIntent: PendingIntent,
    shouldTint: Boolean
): CustomTabsIntent.Builder
```

Sets the action button that is displayed in the Toolbar.

This is equivalent to calling `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#addToolbarItem(int,android.graphics.Bitmap,java.lang.String,android.app.PendingIntent)` with `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#TOOLBAR_ACTION_BUTTON_ID()` as id.

| Parameters |
|---|---|
| `icon: https://developer.android.com/reference/android/graphics/Bitmap.html` | The icon. |
| `description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The description for the button. To be used for accessibility. |
| `pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html` | pending intent delivered when the button is clicked. |
| `shouldTint: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the action button should be tinted.. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#addToolbarItem(int,android.graphics.Bitmap,java.lang.String,android.app.PendingIntent)` |   |

### setActivitySideSheetBreakpointDp

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/browser#1.8.0)

```
fun setActivitySideSheetBreakpointDp(breakpointDp: @Dimension(unit = 0) Int): CustomTabsIntent.Builder
```

Sets the Custom Tab Activity's transition breakpoint in DP.

| Parameters |
|---|---|
| `breakpointDp: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Custom Tab Activity's breakpoint in DP. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_ACTIVITY_SIDE_SHEET_BREAKPOINT_DP()` |   |

### setActivitySideSheetDecorationType

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/browser#1.8.0)

```
fun setActivitySideSheetDecorationType(decorationType: Int): CustomTabsIntent.Builder
```

Sets the Custom Tab Activity's decoration type that will be displayed when it is acting as a side sheet.

| Parameters |
|---|---|
| `decorationType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Custom Tab Activity's decoration type. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_ACTIVITY_SIDE_SHEET_DECORATION_TYPE()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_SIDE_SHEET_DECORATION_TYPE_DEFAULT()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_SIDE_SHEET_DECORATION_TYPE_NONE()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_SIDE_SHEET_DECORATION_TYPE_SHADOW()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_SIDE_SHEET_DECORATION_TYPE_DIVIDER()` |   |

### setActivitySideSheetMaximizationEnabled

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/browser#1.8.0)

```
fun setActivitySideSheetMaximizationEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Enables or disables the maximization button for when the Custom Tab Activity is acting as a side sheet. The button is disabled by default.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the maximization button is enabled. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_ACTIVITY_SIDE_SHEET_ENABLE_MAXIMIZATION()` |   |

### setActivitySideSheetPosition

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/browser#1.8.0)

```
fun setActivitySideSheetPosition(position: Int): CustomTabsIntent.Builder
```

Sets the Custom Tab Activity's position when acting as a side sheet.

| Parameters |
|---|---|
| `position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Custom Tab Activity's position. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_ACTIVITY_SIDE_SHEET_POSITION()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#CLOSE_BUTTON_POSITION_DEFAULT()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#CLOSE_BUTTON_POSITION_START()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#CLOSE_BUTTON_POSITION_END()` |   |

### setActivitySideSheetRoundedCornersPosition

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/browser#1.8.0)

```
fun setActivitySideSheetRoundedCornersPosition(roundedCornersPosition: Int): CustomTabsIntent.Builder
```

Sets the Custom Tab Activity's rounded corners position when it is acting as a side sheet.

| Parameters |
|---|---|
| `roundedCornersPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Custom Tab Activity's rounded corners position. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_ACTIVITY_SIDE_SHEET_ROUNDED_CORNERS_POSITION()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_SIDE_SHEET_ROUNDED_CORNERS_POSITION_DEFAULT()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_SIDE_SHEET_ROUNDED_CORNERS_POSITION_NONE()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_SIDE_SHEET_ROUNDED_CORNERS_POSITION_TOP()` |   |

### setBackgroundInteractionEnabled

Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/browser#1.7.0)

```
fun setBackgroundInteractionEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Enables the capability of the interaction with background. Enables the interactions with the background app when a Partial Custom Tab is launched.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the background interaction is enabled. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_DISABLE_BACKGROUND_INTERACTION()` |   |

### setBookmarksButtonEnabled

Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/browser#1.7.0)

```
fun setBookmarksButtonEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Enables or disables the bookmarks button in the overflow menu. The button is enabled by default.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the start button is enabled. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_DISABLE_BOOKMARKS_BUTTON()` |   |

### setCloseButtonEnabled

Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

```
fun setCloseButtonEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Sets whether to enable the close button for custom tab. The close button is enabled by default. If the close button is disabled, calls to `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setCloseButtonIcon(android.graphics.Bitmap)` or `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setCloseButtonPosition(int)` have no effect.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the close button is enabled. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_CLOSE_BUTTON_ENABLED()` |   |

### setCloseButtonIcon

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setCloseButtonIcon(icon: Bitmap): CustomTabsIntent.Builder
```

Sets the Close button icon for the custom tab. If the close button is disabled (see `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setCloseButtonEnabled(boolean)`), then calling this function has no effect.

| Parameters |
|---|---|
| `icon: https://developer.android.com/reference/android/graphics/Bitmap.html` | The icon `https://developer.android.com/reference/android/graphics/Bitmap.html` |

### setCloseButtonPosition

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/browser#1.5.0)

```
fun setCloseButtonPosition(position: Int): CustomTabsIntent.Builder
```

Sets the position of the close button. If the close button is disabled (see `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setCloseButtonEnabled(boolean)`), then calling this function has no effect.

| Parameters |
|---|---|
| `position: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The desired position. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#CLOSE_BUTTON_POSITION_DEFAULT()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#CLOSE_BUTTON_POSITION_START()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#CLOSE_BUTTON_POSITION_END()` |   |

### setColorScheme

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setColorScheme(colorScheme: Int): CustomTabsIntent.Builder
```

Sets the color scheme that should be applied to the user interface in the custom tab.

| Parameters |
|---|---|
| `colorScheme: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Desired color scheme. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#COLOR_SCHEME_SYSTEM()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#COLOR_SCHEME_LIGHT()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#COLOR_SCHEME_DARK()` |   |

### setColorSchemeParams

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setColorSchemeParams(
    colorScheme: Int,
    params: CustomTabColorSchemeParams
): CustomTabsIntent.Builder
```

Sets `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams` for the given color scheme. This allows specifying two different toolbar colors for light and dark schemes. It can be useful if `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#COLOR_SCHEME_SYSTEM()` is set: Custom Tabs will follow the system settings and apply the corresponding `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams` "on the fly" when the settings change. If there is no `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams` for the current scheme, or a particular field of it is null, Custom Tabs will fall back to the defaults provided via `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)`. Example:

```kotlin
    CustomTabColorSchemeParams darkParams = new CustomTabColorSchemeParams.Builder()
            .setToolbarColor(darkColor)
            .build();
    CustomTabColorSchemeParams otherParams = new CustomTabColorSchemeParams.Builder()
            .setNavigationBarColor(otherColor)
            .build();
    CustomTabIntent intent = new CustomTabIntent.Builder()
            .setColorScheme(COLOR_SCHEME_SYSTEM)
            .setColorSchemeParams(COLOR_SCHEME_DARK, darkParams)
            .setDefaultColorSchemeParams(otherParams)
            .build();
```

| Parameters |
|---|---|
| `colorScheme: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | A constant representing a color scheme (see `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setColorScheme(int)`). It should not be `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#COLOR_SCHEME_SYSTEM()`, because that represents a behavior rather than a particular color scheme. |
| `params: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams` | An instance of `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams`. |

### setDefaultColorSchemeParams

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun setDefaultColorSchemeParams(params: CustomTabColorSchemeParams): CustomTabsIntent.Builder
```

Sets the default `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams`. This will set a default color scheme that applies when no CustomTabColorSchemeParams specified for current color scheme via `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setColorSchemeParams(int,androidx.browser.customtabs.CustomTabColorSchemeParams)`.

| Parameters |
|---|---|
| `params: https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams` | An instance of `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabColorSchemeParams`. |

### setDefaultShareMenuItemEnabled

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun [setDefaultShareMenuItemEnabled](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultShareMenuItemEnabled(boolean))(enabled: Boolean): CustomTabsIntent.Builder
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setShareState(int)` instead. This will set the share state to `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#SHARE_STATE_ON()` or `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#SHARE_STATE_OFF()` based on `enabled`.

Set whether a default share item is added to the menu.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether default share item is added. |

### setDownloadButtonEnabled

Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/browser#1.7.0)

```
fun setDownloadButtonEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Enables or disables the download button in the overflow menu. The button is enabled by default.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the download button is enabled. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_DISABLE_DOWNLOAD_BUTTON()` |   |

### setEphemeralBrowsingEnabled

Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

```
fun setEphemeralBrowsingEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Sets whether to enable ephemeral browsing within the Custom Tab. If ephemeral browsing is enabled, and the browser supports it, the Custom Tab does not share cookies or other data with the browser.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether ephemeral browsing is enabled. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_ENABLE_EPHEMERAL_BROWSING()` |   |

### setExitAnimations

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setExitAnimations(
    context: Context,
    enterResId: @AnimRes Int,
    exitResId: @AnimRes Int
): CustomTabsIntent.Builder
```

Sets the exit animations.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | Application context. |
| `enterResId: @https://developer.android.com/reference/kotlin/androidx/annotation/AnimRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Resource ID of the "enter" animation for the application. |
| `exitResId: @https://developer.android.com/reference/kotlin/androidx/annotation/AnimRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Resource ID of the "exit" animation for the browser. |

### setInitialActivityHeightPx

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/browser#1.5.0)

```
fun setInitialActivityHeightPx(initialHeightPx: @Dimension(unit = 1) Int): CustomTabsIntent.Builder
```

Sets the Custom Tab Activity's initial height in pixels with default resize behavior. The Custom Tab will behave as a bottom sheet if the screen's width is smaller than the breakpoint value set by `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActivitySideSheetBreakpointDp(int)`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setInitialActivityHeightPx(int,int)` |   |

### setInitialActivityHeightPx

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/browser#1.5.0)

```
fun setInitialActivityHeightPx(
    initialHeightPx: @Dimension(unit = 1) Int,
    activityHeightResizeBehavior: Int
): CustomTabsIntent.Builder
```

Sets the Custom Tab Activity's initial height in pixels and the desired resize behavior. The Custom Tab will behave as a bottom sheet if the screen's width is smaller than the breakpoint value set by `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActivitySideSheetBreakpointDp(int)`.

| Parameters |
|---|---|
| `initialHeightPx: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Custom Tab Activity's initial height in pixels. |
| `activityHeightResizeBehavior: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Desired height behavior. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_INITIAL_ACTIVITY_HEIGHT_PX()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_ACTIVITY_HEIGHT_RESIZE_BEHAVIOR()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_HEIGHT_DEFAULT()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_HEIGHT_ADJUSTABLE()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#ACTIVITY_HEIGHT_FIXED()` |   |

### setInitialActivityWidthPx

Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/browser#1.8.0)

```
fun setInitialActivityWidthPx(initialWidthPx: @Dimension(unit = 1) Int): CustomTabsIntent.Builder
```

Sets the Custom Tab Activity's initial width in pixels. The Custom Tab will behave as a side sheet if the screen's width is bigger than the breakpoint value set by `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setActivitySideSheetBreakpointDp(int)` and the screen is big enough, see doc for `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_INITIAL_ACTIVITY_WIDTH_PX()`.

| Parameters |
|---|---|
| `initialWidthPx: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Custom Tab Activity's initial width in pixels. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_INITIAL_ACTIVITY_WIDTH_PX()` |   |

### setInitialNavigationAllowedToLeaveBrowser

Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

```
@ExperimentalInitialNavigationCanLeaveBrowser
fun setInitialNavigationAllowedToLeaveBrowser(enabled: Boolean): CustomTabsIntent.Builder
```

Allows the Custom Tab to forward the initial URL sent to the Custom Tab to the default handling app for that URL instead of loading it (including following any redirects) in the Custom Tab.

Note: This is not the default behavior. The default for this is to be set to false.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the initial URL sent to the custom tab should be sent to the default handling app for that URL. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_INITIAL_NAVIGATION_CAN_LEAVE_BROWSER()` |   |

### setInstantAppsEnabled

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setInstantAppsEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Sets whether Instant Apps is enabled for this Custom Tab.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether Instant Apps should be enabled. |

### setNavigationBarColor

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun [setNavigationBarColor](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setNavigationBarColor(int))(color: @ColorInt Int): CustomTabsIntent.Builder
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)` instead.

Sets the navigation bar color. Has no effect on API versions below L. To ensure good contrast between navigation bar icons and the background, Custom Tab implementations may use `https://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR` on Android O and above, and darken the provided color on Android L-N. Can be overridden for particular color schemes, see `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setColorSchemeParams(int,androidx.browser.customtabs.CustomTabColorSchemeParams)`.

| Parameters |
|---|---|
| `color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The color for the navigation bar. |

### setNavigationBarDividerColor

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun [setNavigationBarDividerColor](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setNavigationBarDividerColor(int))(color: @ColorInt Int): CustomTabsIntent.Builder
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)` instead.

Sets the navigation bar divider color. Has no effect on API versions below P. Can be overridden for particular color schemes, see `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setColorSchemeParams(int,androidx.browser.customtabs.CustomTabColorSchemeParams)`.

| Parameters |
|---|---|
| `color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The color for the navigation bar divider. |

### setNetwork

Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

```
fun setNetwork(network: Network): CustomTabsIntent.Builder
```

Sets the target network `https://developer.android.com/reference/android/net/Network.html` to bind when launching a custom tab. This API allows the caller to specify the target network to bind when launching a URL via Custom Tabs, e.g. may want to open a custom tab over a Wi-Fi network, while the default network is a cellular connection. All URLRequests created in the future via this tab will be bound to `https://developer.android.com/reference/android/net/Network.html`. If the browser does not support this feature it will be ignored and a Custom Tab will be opened using the default network. Check the support by calling `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsClient#isSetNetworkSupported(android.content.Context,java.lang.String)`.

| Parameters |
|---|---|
| `network: https://developer.android.com/reference/android/net/Network.html` | `https://developer.android.com/reference/android/net/Network.html` the target network to be bound. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_NETWORK()` |   |

### setOpenInBrowserButtonState

Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

```
fun setOpenInBrowserButtonState(openInBrowserState: Int): CustomTabsIntent.Builder
```

Sets the state for the Open in Browser button in the toolbar for this Custom Tab.

| Parameters |
|---|---|
| `openInBrowserState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Desired Open in Browser state. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | when an invalid option is provided. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_OPEN_IN_BROWSER_STATE()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#OPEN_IN_BROWSER_STATE_DEFAULT()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#OPEN_IN_BROWSER_STATE_ON()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#OPEN_IN_BROWSER_STATE_OFF()` |   |

### setPendingSession

Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/browser#1.9.0)

```
fun setPendingSession(session: CustomTabsSession.PendingSession): CustomTabsIntent.Builder
```

Associates the `https://developer.android.com/reference/android/content/Intent.html` with the given `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession.PendingSession`. Overrides the effect of `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setSession(androidx.browser.customtabs.CustomTabsSession)`.

### setSecondaryToolbarColor

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun [setSecondaryToolbarColor](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarColor(int))(color: @ColorInt Int): CustomTabsIntent.Builder
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)` instead.

Sets the color of the secondary toolbar. Can be overridden for particular color schemes, see `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setColorSchemeParams(int,androidx.browser.customtabs.CustomTabColorSchemeParams)`.

| Parameters |
|---|---|
| `color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The color for the secondary toolbar. |

### setSecondaryToolbarSwipeUpGesture

Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/browser#1.7.0)

```
fun setSecondaryToolbarSwipeUpGesture(pendingIntent: PendingIntent?): CustomTabsIntent.Builder
```

Sets the `https://developer.android.com/reference/android/app/PendingIntent.html` to be sent when the user swipes up from the secondary (bottom) toolbar.

| Parameters |
|---|---|
| `pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html?` | The `https://developer.android.com/reference/android/app/PendingIntent.html` that will be sent when the user swipes up from the secondary toolbar. |

### setSecondaryToolbarViews

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setSecondaryToolbarViews(
    remoteViews: RemoteViews,
    clickableIDs: IntArray<Int>?,
    pendingIntent: PendingIntent?
): CustomTabsIntent.Builder
```

Sets the remote views displayed in the secondary toolbar in a custom tab.

| Parameters |
|---|---|
| `remoteViews: https://developer.android.com/reference/android/widget/RemoteViews.html` | The `https://developer.android.com/reference/android/widget/RemoteViews.html` that will be shown on the secondary toolbar. |
| `clickableIDs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>?` | The IDs of clickable views. The onClick event of these views will be handled by custom tabs. |
| `pendingIntent: https://developer.android.com/reference/android/app/PendingIntent.html?` | The `https://developer.android.com/reference/android/app/PendingIntent.html` that will be sent when the user clicks on one of the `https://developer.android.com/reference/android/view/View.html`s in clickableIDs. When the `https://developer.android.com/reference/android/app/PendingIntent.html` is sent, it will have the current URL as its intent data. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS_VIEW_IDS()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS_PENDINGINTENT()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_REMOTEVIEWS_CLICKED_ID()` |   |

### setSendToExternalDefaultHandlerEnabled

Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/browser#1.7.0)

```
fun setSendToExternalDefaultHandlerEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Enables sending any redirects off of the initial URL sent to the Custom Tab to default handling apps. Unless #EXTRA_INITIAL_NAVIGATION_CAN_LEAVE_BROWSER is also set, the initial URL will still always load in the Custom Tab.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether to send urls to external handler. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_SEND_TO_EXTERNAL_DEFAULT_HANDLER()` |   |

### setSession

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setSession(session: CustomTabsSession): CustomTabsIntent.Builder
```

Associates the `https://developer.android.com/reference/android/content/Intent.html` with the given `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsSession`. Guarantees that the `https://developer.android.com/reference/android/content/Intent.html` will be sent to the same component as the one the session is associated with.

### setShareIdentityEnabled

Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/browser#1.7.0)

```
fun setShareIdentityEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Allow Custom Tabs to obtain the caller's identity i.e. package name.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the identity sharing is enabled. |

### setShareState

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun setShareState(shareState: Int): CustomTabsIntent.Builder
```

Sets the share state that should be applied to the custom tab.

| Parameters |
|---|---|
| `shareState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Desired share state. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#SHARE_STATE_DEFAULT()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#SHARE_STATE_ON()` |   |
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#SHARE_STATE_OFF()` |   |

### setShowTitle

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setShowTitle(showTitle: Boolean): CustomTabsIntent.Builder
```

Sets whether the title should be shown in the custom tab.

| Parameters |
|---|---|
| `showTitle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the title should be shown. |

### setStartAnimations

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0)

```
fun setStartAnimations(
    context: Context,
    enterResId: @AnimRes Int,
    exitResId: @AnimRes Int
): CustomTabsIntent.Builder
```

Sets the start animations.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | Application context. |
| `enterResId: @https://developer.android.com/reference/kotlin/androidx/annotation/AnimRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Resource ID of the "enter" animation for the browser. |
| `exitResId: @https://developer.android.com/reference/kotlin/androidx/annotation/AnimRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Resource ID of the "exit" animation for the application. |

### setToolbarColor

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/browser#1.2.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun [setToolbarColor](https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setToolbarColor(int))(color: @ColorInt Int): CustomTabsIntent.Builder
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setDefaultColorSchemeParams(androidx.browser.customtabs.CustomTabColorSchemeParams)` instead.

Sets the toolbar color. On Android L and above, this color is also applied to the status bar. To ensure good contrast between status bar icons and the background, Custom Tab implementations may use `https://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_LIGHT_STATUS_BAR` on Android M and above, and use a darkened color for the status bar on Android L. Can be overridden for particular color schemes, see `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent.Builder#setColorSchemeParams(int,androidx.browser.customtabs.CustomTabColorSchemeParams)`.

| Parameters |
|---|---|
| `color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/graphics/Color.html` |

### setToolbarCornerRadiusDp

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/browser#1.5.0)

```
fun setToolbarCornerRadiusDp(cornerRadiusDp: @Dimension(unit = 0) Int): CustomTabsIntent.Builder
```

Sets the toolbar's top corner radii in dp.

| Parameters |
|---|---|
| `cornerRadiusDp: @https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The toolbar's top corner radii in dp. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_TOOLBAR_CORNER_RADIUS_DP()` |   |

### setTranslateLocale

Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/browser#1.7.0)

```
fun setTranslateLocale(locale: Locale): CustomTabsIntent.Builder
```

Specifies the target locale the Translate UI should be triggered with.

| Parameters |
|---|---|
| `locale: https://developer.android.com/reference/java/util/Locale.html` | `https://developer.android.com/reference/java/util/Locale.html` object that represents the target locale. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/customtabs/CustomTabsIntent#EXTRA_TRANSLATE_LANGUAGE_TAG()` |   |

### setUrlBarHidingEnabled

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/browser#1.3.0)

```
fun setUrlBarHidingEnabled(enabled: Boolean): CustomTabsIntent.Builder
```

Set whether the url bar should hide as the user scrolls down on the page.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether url bar hiding is enabled. |