WebkitWebViewSettings
WebkitWebViewSettings
Fields:
- CACHEMODE_LOAD_CACHE_ELSE_NETWORK As Int
- CACHEMODE_LOAD_CACHE_ONLY As Int
- CACHEMODE_LOAD_DEFAULT As Int
- CACHEMODE_LOAD_NO_CACHE As Int
- FORCE_DARK_AUTO As Int
- FORCE_DARK_OFF As Int
- FORCE_DARK_ON As Int
- MENU_ITEM_NONE As Int
- MENU_ITEM_PROCESS_TEXT As Int
- MENU_ITEM_SHARE As Int
- MENU_ITEM_WEB_SEARCH As Int
- MIXED_CONTENT_ALWAYS_ALLOW As Int
- MIXED_CONTENT_COMPATIBILITY_MODE As Int
- MIXED_CONTENT_NEVER_ALLOW As Int
- SCROLLBAR_POSITION_DEFAULT As Int
- SCROLLBAR_POSITION_LEFT As Int
- SCROLLBAR_POSITION_RIGHT As Int
- SCROLLBARS_INSIDE_INSET As Int
- SCROLLBARS_INSIDE_OVERLAY As Int
- SCROLLBARS_OUTSIDE_INSET As Int
- SCROLLBARS_OUTSIDE_OVERLAY As Int
Functions:
- ImportSettingsFrom (FromWebView As WebView) As String
Import settings from other WebView without referencing.
- Initialize (WebView1 As WebView) As String
Initializes the object. You can add parameters to this method if needed.
- IsInitialized As Boolean
Tests whether the object has been initialized.
Properties:
- AlgorithmicDarkeningAllowed As Boolean
Control whether algorithmic darkening is allowed.
Added in API level 33
- AllowContentAccess As Boolean
Enables or disables content URL access within WebView.
Added in API level 11.
- AllowFileAccess As Boolean
Enables or disables file access within WebView.
Added in API level 3.
- AllowFileAccessFromFileURLs As Boolean
Added in API level 16.
This method was deprecated in API level 30. This setting is not secure.
- AllowUniversalAccessFromFileURLs As Boolean
Added in API level 16.
This method was deprecated in API level 30. This setting is not secure.
- AppCacheEnabled As Boolean
Added in API level 7.
This method was deprecated in API level 30. The Application Cache API is deprecated and this method will become a no-op on all Android versions once support is removed in Chromium. Consider using Service Workers instead. See https://web.dev/appcache-removal/ for more information.
- AppCacheMaxSize As Long
Added in API level 7.
Value in bytes. This method was deprecated in API level 18. Quota is managed automatically; this method is a no-op.
- AppCachePath As String
Added in API level 7.
This method was deprecated in API level 30. The Application Cache API is deprecated and this method will become a no-op on all Android versions once support is removed in Chromium. Consider using Service Workers instead. See https://web.dev/appcache-removal/ for more information.
- BlockNetworkImage As Boolean
Sets whether the WebView should not load image resources from the network (resources accessed via http and https URI schemes).
Added in API level 1.
- BlockNetworkLoads As Boolean
Sets whether the WebView should not load resources from the network.
Added in API level 8.
- BuiltInZoomControls As Boolean
Sets whether the WebView should use its built-in zoom mechanisms.
Added in API level 3.
- CacheMode As Int
Overrides the way the cache is used. Values: CACHEMODE_LOAD_DEFAULT, CACHEMODE_LOAD_CACHE_ELSE_NETWORK, CACHEMODE_LOAD_NO_CACHE and CACHEMODE_LOAD_CACHE_ONLY=3.
Added in API level 1.
- CursiveFontFamily As String
Sets the cursive font family name.
Added in API level 1.
- DatabaseEnabled As Boolean
Sets whether the database storage API is enabled.
Added in API level 5.
- DatabasePath As String
Added in API level 5.
This method was deprecated in API level 19. Database paths are managed by the implementation and calling this method will have no effect.
- DefaultFixedFontSize As Int
Sets the default fixed font size.
Added in API level 1.
- DefaultFontSize As Int
Sets the default font size.
Added in API level 1.
- DefaultTextEncodingName As String
Sets the default text encoding name to use when decoding html pages. The default is "UTF-8".
Added in API level 1.
- DefaultUserAgent As String [read only]
Returns the default User-Agent used by a WebView. An instance of WebView could use a different User-Agent if a call is made UserAgentString as String.
- DisabledActionModeMenuItems As Int
Disables the action mode menu items according to menuItems flag. Values: MENU_ITEM_NONE, MENU_ITEM_SHARE, MENU_ITEM_WEB_SEARCH or MENU_ITEM_PROCESS_TEXT.
Added in API level 24.
- DisplayZoomControls As Boolean
Sets whether the WebView should display on-screen zoom controls when using the built-in zoom mechanisms.
Added in API level 11.
- DomStorageEnabled As Boolean
Sets whether the DOM storage API is enabled.
Added in API level 7.
- EnableSmoothTransition As Boolean
This method was deprecated in API level 17. This method is now obsolete, and will become a no-op in future.
Added in API level 11.
- FantasyFontFamily As String
Sets the fantasy font family name.
Added in API level 1.
- FixedFontFamily As String
Sets the fixed font family name.
Added in API level 1.
- ForceDark As Int
Set the force dark mode for this WebView.
Values (FORCE_DARK_OFF=0, FORCE_DARK_AUTO=1, FORCE_DARK_ON=2)
Added in API level 29.
Deprecated in API level 33
- GeolocationDatabasePath As String
Added in API level 5.
Deprecated in API level 24.
- GeolocationEnabled As Boolean
Sets whether Geolocation is enabled. Permissions in manifest: Manifest.permission.ACCESS_COARSE_LOCATION and Manifest.permission.ACCESS_FINE_LOCATION.
Added in API level 5.
- GetMe As Object [read only]
Gets this class Me variable.
- HorizontalFadingEdgeEnabled As Boolean
Define whether the horizontal edges should be faded when this view is scrolled horizontally.
Added in API level 1.
- HorizontalScrollBarEnabled As Boolean
Define whether the horizontal scrollbar should be drawn or not.
Added in API level 1.
- HorizontalScrollBarThumbColor As Int [write only]
Defines the horizontal thumb color.
Added in API level 29.
- HorizontalScrollBarTrackColor As Int [write only]
Defines the horizontal track color.
Added in API level 29.
- JavaScriptCanOpenWindowsAutomatically As Boolean
Allow JavaScript to open windows automatically.
Added in API level 1.
- LightTouchEnabled As Boolean
This method was deprecated in API level 18. From Build.VERSION_CODES.JELLY_BEAN this setting is obsolete and has no effect.
Added in API level 1.
- LoadsImagesAutomatically As Boolean
Sets whether the WebView should load image resources.
Added in API level 1.
- LoadWithOverviewMode As Boolean
Sets whether the WebView loads pages in overview mode, that is, zooms out the content to fit on screen by width.
Added in API level 7.
- MediaPlaybackRequiresUserGesture As Boolean
Sets whether the WebView requires a user gesture to play media.
Added in API level 17.
- MinimumFontSize As Int
Sets the minimum font size.
Added in API level 1.
- MinimumLogicalFontSize As Int
Sets the minimum logical font size.
Added in API level 1.
- MixedContentMode As Int
Configures the WebView's behavior when a secure origin attempts to load a resource from an insecure origin.
Values (MIXED_CONTENT_ALWAYS_ALLOW=0, MIXED_CONTENT_NEVER_ALLOW=1, MIXED_CONTENT_COMPATIBILITY_MODE=2).
Added in API level 21.
- NeedInitialFocus As Boolean
Tells the WebView whether it needs to set a node to have focus when WebView#requestFocus(int, android.graphics.Rect) is called.
Added in API level 1.
- OffscreenPreRaster As Boolean
Sets whether this WebView should raster tiles when it is offscreen but attached to a window.
Added in API level 23.
- SafeBrowsingEnabled As Boolean
Sets whether Safe Browsing is enabled.
Added in API level 26.
- SansSerifFontFamily As String
Sets the sans-serif font family name.
Added in API level 1.
- SaveFormData As Boolean
This method was deprecated in API level 26. In Android O and afterwards, this function does not have any effect, the form data will be saved to platform's autofill service if applicable.
Added in API level 1.
- SavePassword As Boolean
This method was deprecated in API level 18. Saving passwords in WebView will not be supported in future versions.
Added in API level 1.
- ScrollBarDefaultDelayBeforeFade As Int
Define the delay in milliseconds before scrollbars fade.
Added in API level 16.
- ScrollBarFadeDuration As Int
Define the scrollbar fade duration in milliseconds.
Added in API level 16.
- ScrollBarFadingEnabled As Boolean
Define whether scrollbars will fade when the view is not scrolling.
Added in API level 5.
- ScrollBarSize As Int
Define the scrollbar size in dip.
Added in API level 16.
- ScrollBarStyle As Int [write only]
Specify the style of the scrollbars.
Values: For example, if a view has a background drawable and you want to draw the scrollbars inside the padding specified by the drawable, you can use SCROLLBARS_INSIDE_OVERLAY or SCROLLBARS_INSIDE_INSET. If you want them to appear at the edge of the view, ignoring the padding, then you can use SCROLLBARS_OUTSIDE_OVERLAY or SCROLLBARS_OUTSIDE_INSET.
Added in API level 1.
- SerifFontFamily As String
Sets the serif font family name.
Added in API level 1.
- StandardFontFamily As String
Sets the standard font family name.
Added in API level 1.
- SupportMultipleWindows As Boolean
Sets whether the WebView whether supports multiple windows.
Added in API level 1.
- SupportZoom As Boolean
Sets whether the WebView should support zooming using its on-screen zoom controls and gestures.
Added in API level 1.
- TextZoom As Int
Sets the text zoom of the page in percent.
Added in API level 14.
- UserAgentString As String
Sets the WebView's user-agent string.
Added in API level 3.
- UseWideViewPort As Boolean
Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport.
Added in API level 1.
- VerticalFadingEdgeEnabled As Boolean
Define whether the vertical edges should be faded when this view is scrolled vertically.
Added in API level 1.
- VerticalScrollBarEnabled As Boolean
Define whether the vertical scrollbar should be drawn or not.
Added in API level 1.
- VerticalScrollBarPosition As Int [write only]
Set the position of the vertical scroll bar. Should be one of SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT or SCROLLBAR_POSITION_RIGHT.
Added in API level 11.
- VerticalScrollBarThumbColor As Int [write only]
Defines the vertical scrollbar thumb color.
Added in API level 29.
- VerticalScrollBarTrackColor As Int [write only]
Defines the vertical scrollbar track color.
Added in API level 29.