Skip to content

AndroidBrowserOptions

Configuration options for the in-app browser. Properties left as null use the system or browser default. Use AndroidBrowserOptionsBuilder to create instances.

Kodster.InAppWebBrowser.Android.AndroidBrowserOptions

Creating Instances

#if UNITY_ANDROID
var options = new AndroidBrowserOptionsBuilder()
    .WithColorScheme(AndroidColorScheme.Dark)
    .WithTitleShown(true)
    .Build();

AndroidBrowser.Open("https://example.com", options);
#endif

Properties

TitleShown

public bool? TitleShown { get; internal set; }

Whether the page title is shown in the toolbar.

ShareButtonState

public ShareButtonState? ShareButtonState { get; internal set; }

Visibility of the share button.

UrlHidingEnabled

public bool? UrlHidingEnabled { get; internal set; }

Whether the URL bar is hidden when scrolling down the page.

BookmarksButtonEnabled

public bool? BookmarksButtonEnabled { get; internal set; }

Whether the bookmark button is shown in the overflow menu.

DownloadButtonEnabled

public bool? DownloadButtonEnabled { get; internal set; }

Whether the download button is shown in the overflow menu.

CloseButtonPosition

public CloseButtonPosition? CloseButtonPosition { get; internal set; }

Position of the close button in the toolbar.

CloseButtonIcon

public CloseButtonIcon? CloseButtonIcon { get; internal set; }

The icon style used for the close button.

ColorScheme

public AndroidColorScheme? ColorScheme { get; internal set; }

Color scheme used for the browser UI.

LightColorSchemeOptions

public ColorSchemeOptions? LightColorSchemeOptions { get; internal set; }

Color customization applied when the browser is in light mode.

DarkColorSchemeOptions

public ColorSchemeOptions? DarkColorSchemeOptions { get; internal set; }

Color customization applied when the browser is in dark mode.

DefaultColorSchemeOptions

public ColorSchemeOptions? DefaultColorSchemeOptions { get; internal set; }

Color customization used as a fallback when no mode-specific options are matched.

InitialHeightPercent

public int? InitialHeightPercent { get; internal set; }

Initial height of the browser as a percentage of the screen height, in bottom-sheet mode.

Remarks

  • Values set via AndroidBrowserOptionsBuilder.WithInitialHeightPercent are clamped between 50 and 100.

HeightResizeBehavior

public HeightResizeBehavior? HeightResizeBehavior { get; internal set; }

Whether the user can resize the browser height in bottom-sheet mode.

ToolbarCornerRadiusDp

public int? ToolbarCornerRadiusDp { get; internal set; }

Corner radius of the toolbar, in density-independent pixels (dp).

Remarks

  • Values set via AndroidBrowserOptionsBuilder.WithToolbarCornerRadiusDp are clamped between 1 and 16.

SideSheetBreakpointDp

public int? SideSheetBreakpointDp { get; internal set; }

Screen width, in dp, at which the browser switches to side-sheet mode.

Remarks

  • Side-sheet is not displayed if screen width is less than 600dp.

InitialWidthPercent

public int? InitialWidthPercent { get; internal set; }

Initial width of the browser as a percentage of the screen width, in side-sheet mode.

Remarks

  • Values set via AndroidBrowserOptionsBuilder.WithInitialWidthPercent are clamped between 33 and 100.
  • For window width >= 600dp and < 840dp, side-sheet width is effectively between 50% and 100%.
  • For window width >= 840dp, side-sheet width is between 33% and 100%.

SideSheetPosition

public SideSheetPosition? SideSheetPosition { get; internal set; }

Position of the side-sheet on the screen.

SideSheetDecoration

public SideSheetDecoration? SideSheetDecoration { get; internal set; }

Decoration style applied to the side-sheet.

SideSheetMaximizationEnabled

public bool? SideSheetMaximizationEnabled { get; internal set; }

Whether the side-sheet can be maximized to fill the screen.

SideSheetRoundedCornersPosition

public SideSheetRoundedCornersPosition? SideSheetRoundedCornersPosition { get; internal set; }

Which corners of the side-sheet have rounded styling applied.

BackgroundInteractionEnabled

public bool? BackgroundInteractionEnabled { get; internal set; }

Whether the user can interact with the app behind the browser while it is displayed in partial-screen mode.

OpenTransition

public AndroidBrowserTransition? OpenTransition { get; internal set; }

Transition played when the browser opens.

CloseTransition

public AndroidBrowserTransition? CloseTransition { get; internal set; }

Transition played when the browser closes.

EphemeralBrowsingEnabled

public bool? EphemeralBrowsingEnabled { get; internal set; }

Whether the browser clears cookies and browsing data when closed.

AppSpecificHistoryEnabled

public bool? AppSpecificHistoryEnabled { get; internal set; }

Whether to opt in to App-specific history, available from Chrome 126 on Android 14+. When enabled, links opened in the browser are recorded in Chrome's history alongside the app's name, allowing users to find and resume previously visited pages.

OpenInExternalHandlerEnabled

public bool? OpenInExternalHandlerEnabled { get; internal set; }

Whether URLs that match an external app's default handler are forwarded to that app instead of being opened inside the browser.