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¶
Whether the page title is shown in the toolbar.
ShareButtonState¶
Visibility of the share button.
UrlHidingEnabled¶
Whether the URL bar is hidden when scrolling down the page.
BookmarksButtonEnabled¶
Whether the bookmark button is shown in the overflow menu.
DownloadButtonEnabled¶
Whether the download button is shown in the overflow menu.
CloseButtonPosition¶
Position of the close button in the toolbar.
CloseButtonIcon¶
The icon style used for the close button.
ColorScheme¶
Color scheme used for the browser UI.
LightColorSchemeOptions¶
Color customization applied when the browser is in light mode.
DarkColorSchemeOptions¶
Color customization applied when the browser is in dark mode.
DefaultColorSchemeOptions¶
Color customization used as a fallback when no mode-specific options are matched.
InitialHeightPercent¶
Initial height of the browser as a percentage of the screen height, in bottom-sheet mode.
Remarks
- Values set via
AndroidBrowserOptionsBuilder.WithInitialHeightPercentare clamped between50and100.
HeightResizeBehavior¶
Whether the user can resize the browser height in bottom-sheet mode.
ToolbarCornerRadiusDp¶
Corner radius of the toolbar, in density-independent pixels (dp).
Remarks
- Values set via
AndroidBrowserOptionsBuilder.WithToolbarCornerRadiusDpare clamped between1and16.
SideSheetBreakpointDp¶
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¶
Initial width of the browser as a percentage of the screen width, in side-sheet mode.
Remarks
- Values set via
AndroidBrowserOptionsBuilder.WithInitialWidthPercentare clamped between33and100. - For window width
>= 600dpand< 840dp, side-sheet width is effectively between50%and100%. - For window width
>= 840dp, side-sheet width is between33%and100%.
SideSheetPosition¶
Position of the side-sheet on the screen.
SideSheetDecoration¶
Decoration style applied to the side-sheet.
SideSheetMaximizationEnabled¶
Whether the side-sheet can be maximized to fill the screen.
SideSheetRoundedCornersPosition¶
Which corners of the side-sheet have rounded styling applied.
BackgroundInteractionEnabled¶
Whether the user can interact with the app behind the browser while it is displayed in partial-screen mode.
OpenTransition¶
Transition played when the browser opens.
CloseTransition¶
Transition played when the browser closes.
EphemeralBrowsingEnabled¶
Whether the browser clears cookies and browsing data when closed.
AppSpecificHistoryEnabled¶
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¶
Whether URLs that match an external app's default handler are forwarded to that app instead of being opened inside the browser.