Java android.webkit WebSettings fields, constructors, methods, implement or subclass

Example usage for Java android.webkit WebSettings fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.webkit WebSettings.

The text is from its open source code.

Field

intLOAD_DEFAULT
Default cache usage mode.
intLOAD_CACHE_ELSE_NETWORK
Use cached resources when they are available, even if they have expired.
intLOAD_NO_CACHE
Don't use the cache, load from the network.
intLOAD_CACHE_ONLY
Don't use the network, load from the cache.
intMIXED_CONTENT_ALWAYS_ALLOW
Used with #setMixedContentMode In this mode, the WebView will allow a secure origin to load content from any other origin, even if that origin is insecure.
intMIXED_CONTENT_NEVER_ALLOW
Used with #setMixedContentMode In this mode, the WebView will not allow a secure origin to load content from an insecure origin.
intMIXED_CONTENT_COMPATIBILITY_MODE
Used with #setMixedContentMode In this mode, the WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content.

Method

ClassgetClass()
Returns the runtime class of this Object .
StringgetDefaultUserAgent(Context context)
Returns the default User-Agent used by a WebView.
booleangetJavaScriptEnabled()
Gets whether JavaScript is enabled.
StringgetUserAgentString()
Gets the WebView's user-agent string.
voidsetAllowContentAccess(boolean allow)
Enables or disables content URL access within WebView.
voidsetAllowFileAccess(boolean allow)
Enables or disables file access within WebView.
voidsetAllowFileAccessFromFileURLs(boolean flag)
Sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from other file scheme URLs.
voidsetAllowUniversalAccessFromFileURLs(boolean flag)
Sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin.
voidsetAppCacheEnabled(boolean flag)
Sets whether the Application Caches API should be enabled.
voidsetAppCacheMaxSize(long appCacheMaxSize)
Sets the maximum size for the Application Cache content.
voidsetAppCachePath(String appCachePath)
Sets the path to the Application Caches files.
voidsetBlockNetworkImage(boolean flag)
Sets whether the WebView should not load image resources from the network (resources accessed via http and https URI schemes).
voidsetBuiltInZoomControls(boolean enabled)
Sets whether the WebView should use its built-in zoom mechanisms.
voidsetCacheMode(@CacheMode int mode)
Overrides the way the cache is used.
voidsetDatabaseEnabled(boolean flag)
Sets whether the database storage API is enabled.
voidsetDatabasePath(String databasePath)
Sets the path to where database storage API databases should be saved.
voidsetDefaultFontSize(int size)
Sets the default font size.
voidsetDefaultTextEncodingName(String encoding)
Sets the default text encoding name to use when decoding html pages.
voidsetDefaultZoom(ZoomDensity zoom)
Sets the default zoom density of the page.
voidsetDisplayZoomControls(boolean enabled)
Sets whether the WebView should display on-screen zoom controls when using the built-in zoom mechanisms.
voidsetDomStorageEnabled(boolean flag)
Sets whether the DOM storage API is enabled.
voidsetEnableSmoothTransition(boolean enable)
Sets whether the WebView will enable smooth transition while panning or zooming or while the window hosting the WebView does not have focus.
voidsetGeolocationDatabasePath(String databasePath)
Sets the path where the Geolocation databases should be saved.
voidsetGeolocationEnabled(boolean flag)
Sets whether Geolocation is enabled.
voidsetJavaScriptCanOpenWindowsAutomatically(boolean flag)
Tells JavaScript to open windows automatically.
voidsetJavaScriptEnabled(boolean flag)
Tells the WebView to enable JavaScript execution.
voidsetLayoutAlgorithm(LayoutAlgorithm l)
Sets the underlying layout algorithm.
voidsetLightTouchEnabled(boolean enabled)
Enables using light touches to make a selection and activate mouseovers.
voidsetLoadsImagesAutomatically(boolean flag)
Sets whether the WebView should load image resources.
voidsetLoadWithOverviewMode(boolean overview)
Sets whether the WebView loads pages in overview mode, that is, zooms out the content to fit on screen by width.
voidsetMediaPlaybackRequiresUserGesture(boolean require)
Sets whether the WebView requires a user gesture to play media.
voidsetMinimumFontSize(int size)
Sets the minimum font size.
voidsetMinimumLogicalFontSize(int size)
Sets the minimum logical font size.
voidsetMixedContentMode(int mode)
Configures the WebView's behavior when a secure origin attempts to load a resource from an insecure origin.
voidsetNavDump(boolean enabled)
Enables dumping the pages navigation cache to a text file.
voidsetNeedInitialFocus(boolean flag)
Tells the WebView whether it needs to set a node to have focus when WebView#requestFocus(int,android.graphics.Rect) is called.
voidsetPluginsEnabled(boolean flag)
Sets whether the WebView should enable plugins.
voidsetPluginState(PluginState state)
Tells the WebView to enable, disable, or have plugins on demand.
voidsetRenderPriority(RenderPriority priority)
Sets the priority of the Render thread.
voidsetSaveFormData(boolean save)
Sets whether the WebView should save form data.
voidsetSavePassword(boolean save)
Sets whether the WebView should save passwords.
voidsetSupportMultipleWindows(boolean support)
Sets whether the WebView whether supports multiple windows.
voidsetSupportZoom(boolean support)
Sets whether the WebView should support zooming using its on-screen zoom controls and gestures.
voidsetTextSize(TextSize t)
Sets the text size of the page.
voidsetTextZoom(int textZoom)
Sets the text zoom of the page in percent.
voidsetUserAgentString(@Nullable String ua)
Sets the WebView's user-agent string.
voidsetUseWideViewPort(boolean use)
Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport.
booleansupportZoom()
Gets whether the WebView supports zoom.