CustomTabOptions¶
Configuration object that controls the appearance and behavior of a Custom Tab session.
Overview¶
CustomTabOptions contains optional settings for CustomTab.
All properties are nullable. Unset values use system or browser defaults.
Use CustomTabOptionsBuilder to configure values and create instances.
Partial tab-related options apply when launching with LaunchUrlWithSession().
Creating Instances¶
var options = new CustomTabOptionsBuilder()
.WithColorScheme(ColorScheme.Dark)
.WithTitleShowed(true)
.Build();
_customTab.LaunchUrlWithSession("https://example.com", options);
Properties¶
TitleShowed¶
Whether the page title is shown in the toolbar.
ShareState¶
Controls share button visibility.
UrlHidingEnabled¶
Whether the URL bar hides while scrolling.
BookmarksButtonEnabled¶
Whether the bookmarks button is shown.
DownloadButtonEnabled¶
Whether the download button is shown.
CloseButtonPosition¶
Position of the close button.
CloseButtonIcon¶
Close button icon style.
ColorScheme¶
Theme mode for the Custom Tab.
LightColorSchemeOptions¶
Color overrides used in light mode.
DarkColorSchemeOptions¶
Color overrides used in dark mode.
DefaultColorSchemeOptions¶
Fallback color overrides used when mode-specific options are not applied.
InitialHeightPx¶
Initial height in pixels for bottom-sheet mode.
Remarks
- Value is clamped between
50%and100%of the screen.
HeightResizeBehavior¶
Resize behavior for bottom-sheet mode.
ToolbarCornerRadiusDp¶
Toolbar corner radius in dp for bottom-sheet mode.
Remarks
- Allowed values range from
1to16.
SideSheetBreakingPointDp¶
Screen width breakpoint (dp) for switching to side-sheet mode.
Remarks
- Side-sheet is not displayed if screen width is less than
600dp.
InitialWidthPx¶
Initial width in pixels for side-sheet mode.
Remarks
- For window width
>= 600dpand< 840dp, side-sheet width can be between50%and100%. - For window width
>= 840dp, side-sheet width can be between33%and100%.
SideSheetPosition¶
Position of the side-sheet.
SideSheetDecorationType¶
Decoration style for the side-sheet.
SideSheetMaximizationEnabled¶
Whether side-sheet maximization is enabled.
SideSheetRoundedCornersPosition¶
Which side-sheet corners are rounded.
BackgroundInteractionEnabled¶
Whether interaction with the app behind the tab is allowed in partial mode.
OpenAnimation¶
Animation pair used when opening the tab.
CloseAnimation¶
Animation pair used when closing the tab.
EphemeralBrowsingEnabled¶
Whether ephemeral browsing is enabled.
ShareIdentityEnabled¶
Whether app-specific history sharing is enabled.
SendToExternalDefaultHandlerEnabled¶
Whether matching URLs are routed to external default handlers.